Expand/Collapse & Pagination
Expand/Collapse & Pagination
I have just starting (or rather exploring) using this tool & seems pretty impressive. However, in the example for Expand/Collapse http://datatables.net/1.5-beta/examples/api/row_details.html - when rows are expanded - the expanded rows are not counted in the number of rows to display & the pagination is not adjusted with the increased number of rows (expanded) or decresed number of rows (collapsed).
Any suggestions on how to achieve this?
TIA,
-sanju
Any suggestions on how to achieve this?
TIA,
-sanju
This discussion has been closed.
Replies
The 'opened' row is considered to be a child row of the information row in DataTables, and therefore is not counted as part of the pagination. This is fairly core to the concept of fnOpen and fnClose in DataTables - so it might be a little tricky to work around. One option might be to change the value of '_iDisplayLength' whenever you open or close a row (found in the settings object, fnSettings). You would also need a callback on fnDrawCallback to take account of this - which is where the tricky part comes in. But is certainly possible.
Regards,
Allan
Thanks for the turbo-fast response.
The expand/collapse functionality was which caught my attention - maybe in future releases this functionality is integrated with pagination as well.
Except for this it seems to be the perfect & comprehensive library for almost everything that's out there that handles data tables/listing.
-sanju