How to post entire table?

How to post entire table?

AndersMalmgrenAndersMalmgren Posts: 12Questions: 0Answers: 0
edited October 2011 in General
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

Replies

  • Flame113Flame113 Posts: 7Questions: 1Answers: 0
    First time you got that list, put it into cache or session.
    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);
  • AndersMalmgrenAndersMalmgren Posts: 12Questions: 0Answers: 0
    edited October 2011
    There most be a built in way right?

    edit: I could do use the fnLengthChange method to show all rows just before post.. question is if its the best way :P
  • AndersMalmgrenAndersMalmgren Posts: 12Questions: 0Answers: 0
    This also works

    var nodes = this.assignments.fnGetNodes();
    $(nodes).not(":visible").hide().appendTo($("form"));

    But again, best practice?
  • Flame113Flame113 Posts: 7Questions: 1Answers: 0
    I wonder how much time it will need to perform this process :-?
    For example if you have thousands records
This discussion has been closed.