Sorted Array

Sorted Array

cwelrodcwelrod Posts: 4Questions: 0Answers: 0
edited September 2010 in General
Datatables,

How can I return the sorted table array?

I have a print requirement, which requires a get sorted date then writing it to an invisible iframe, stripping all the markup, for printing.

Now I use fnGetData which prints the orginal unsorted set.

Thank you,
Chris

Replies

  • ajoslin103ajoslin103 Posts: 20Questions: 4Answers: 0
    looping aiMasterDisplay to index into aoData to get the items back in sorted order
    (looping with aiDisplay will return the filtered sorted set)
  • cwelrodcwelrod Posts: 4Questions: 0Answers: 0
    Here is the code I used:

    var oSettings = Table.fnSettings();

    for (var i = 0; i < oSettings.aiDisplay.length; i++) {

    var row_ptr = oSettings.aiDisplay[i];

    var temp_row = Table.fnGetData(row_ptr);
    }
This discussion has been closed.