Change the number of displayed rows externally (api?)
Change the number of displayed rows externally (api?)
Hey.
My users would like to see a button of "load 10 more" that would expand the datatable. What's the best way to do it? I see there's no function for it; Should I change the settings with fnSettings and do a fnDraw? Or is there an easier way?
Thanks
-Pedro
My users would like to see a button of "load 10 more" that would expand the datatable. What's the best way to do it? I see there's no function for it; Should I change the settings with fnSettings and do a fnDraw? Or is there an easier way?
Thanks
-Pedro
This discussion has been closed.
Replies
I'd go with fnAddData(). If a user wants to load 10 more rows, then they would click that button, and you would use fnAddData() to add the ten new rows from whatever your data source is.
Allan
If you want to page to the next page you can do something like "$('#{TABLE_ID}_next').click();"
Allan
I load a table with 100 entries that I limit to 10 and I disable pagination.
The user wants to increase the number of displayed items with a "show 10 more" style. I have the data in the dom, I just want to display it, increasing the size of the table like the dropdown does (except this case there's no drop down)
Allan