How to post entire table?
How to post entire table?
AndersMalmgren
Posts: 12Questions: 0Answers: 0
I have standard datatable configuration but with 25 rows visible as default, the maximum data is about 80 rows so i've decided so send the entire table to the client and let him filter, etc and change data in the table.
The problem is that when the data is posted back to the server its only the visible rows that are posted.
Whats the best practice way of getting the table to post all?
Thanks
The problem is that when the data is posted back to the server its only the visible rows that are posted.
Whats the best practice way of getting the table to post all?
Thanks
This discussion has been closed.
Replies
When you post your list back to the server, you will need to compare the current list's size (listA) and the list's size in cache or session (listB).
After that you will need to sublist the listB:
listC = listB.subList(listA.size(), listB.size());
Then: listA.addAll(listC);
edit: I could do use the fnLengthChange method to show all rows just before post.. question is if its the best way :P
var nodes = this.assignments.fnGetNodes();
$(nodes).not(":visible").hide().appendTo($("form"));
But again, best practice?
For example if you have thousands records