trying to select first two colums from table on select
trying to select first two colums from table on select
ggiavelli
Posts: 5Questions: 3Answers: 0
So I am currently getting the first column's data which are selected from my datatable
let rows = table.rows( { selected: true } );
var result = table.cells( rows.nodes(), 0 ).data();
delete result["context"];
delete result["length"];
delete result["selector"];
delete result["ajax"];
But I'd like to get the first two columns of data in the table.
This discussion has been closed.
Answers
Hi @ggiavelli ,
You can just use
rows().data()
to get the entire row's data - so something like:Cheers,
Colin