Display correct 'x rows selected' across multiple pages for server side processing?
Display correct 'x rows selected' across multiple pages for server side processing?
initialfresh
Posts: 8Questions: 4Answers: 0
When using serverside process how to I get the 'x rows selected' to display the correct value for selected rows across all pages.
In my call back function I have this...
"rowCallback": function( row, data ) {
if ( $.inArray(data.Id, selectedNotClaimedPaymentIds) !== -1 ) {
$(row).addClass('selected');
notClaimedTable.row(row, { page: 'all' }).select();
}
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I know that this isn't supported yet but does anyone have a temp solution for the time being.Thanks!
No sorry. As you say it isn't supported at this time and there is currently no workaround. The simple fact is that when you change the page the previously selected rows no longer exist on the client-side, so they can't be selected.
I don't actually see how this can ever be supported when server-side processing is enabled. Imagine, for example, you use
table.rows( { selected: true } ).data()
to get the data for the selected rows, ortable.rows( { selected: true } ).ids()
to get the ids - any rows that were on other pages don't exist and thus can't return any information.Allan