getting one item value from a selected row
getting one item value from a selected row
shawan
Posts: 2Questions: 1Answers: 0
hi,
i have a Table with:
Fname Lname Email
i want a value of Lname when i select any row. how can i do that? thanks
This discussion has been closed.
Answers
Have you looked at the Select extension?
Here is an example:
https://datatables.net/extensions/select/examples/api/get.html
Kevin
i select a row like that:
''' .on( 'select', function ( e, dt, type, indexes ) {
if ( type === 'row' ) {
console.log(table.rows( { selected: true } ).indexes().length)
$( '#Button' ).prop( "disabled", table.rows( { selected: true } ).indexes().length == 0 );
i dont know how i take a value of one Cell from a selected row.
You can try
cell().data()
orrow().data()
. The specifics depend on how your data is structured, ie, using arrays or objects.Kevin