Transfering the order of rows to an other page
Transfering the order of rows to an other page
Hope I'm posting this in the right category.
I have a table that allows the user to filter and order the rows. There's also a link on each row that goes to a different page that shows the detail information of the clicked record. On the detail page, I need a Next/Previous buttons to navigate between the different rows. Since the detail page is on a separate page than the table page, I don't have the list of rows with their order. Knowing which record is the next or previous isn't easy.
I was thinking of transferring the order
DataTable().order()
or maybe transferring each individual rows id.
var tableData = $("#tableId").DataTable().data().toArray();
$("#tableId").DataTable().rows({ order: 'current' }).every(function (rowIdx, tableLoop, rowLoop) {
// I could transfer all rowIdx
// Or transfer all tableData[rowIdx].Id
});
Maybe there's an other way.
This discussion has been closed.
Answers
No, there's no other way, so the second code block would be the way to go. You could also add
search: 'applied'to only get the rows that match the current search criteria.Colin
Thanks for the information and the quick reply!