How to keep the row selected, before draw table ?
How to keep the row selected, before draw table ?
legal1
Posts: 1Questions: 1Answers: 0
oTable = $('#dataTable').DataTable( {
"bProcessing": true,
"bServerSide": true,
"rowId" : 'Id',
"select" : {"select" : "single","selector": 'td:last-child',"toggleable": false},
"sAjaxSource":"..."
};
...
rowSelect = oTable.row({selected: true}); //want to keep the selected row before
oTable.draw('full-hold'); // reload the table because the row change
rowSelect.select(); // not ok, the row is deselect
This discussion has been closed.
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin