How can I edit row entries programatically that are not displayed on the current page?

How can I edit row entries programatically that are not displayed on the current page?

markstahlermarkstahler Posts: 15Questions: 0Answers: 0
edited July 2010 in General
Using the demo for an example of my use case: I need to be able to allow a user to be able to hide all entries that contain the word Firefox. This includes all entries that are not displayed on the current page. To do this it does not seem as simple as looking up the table entries in the HTML. Is it easy to access the data structure that stores the entry information? Could I make my changes directly there? Please, any advice would be appreciate.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    There are a number of options to do this - one of the most approachable is to call fnGetNodes ( http://datatables.net/api#fnGetNodes ) to get an array of all TR elements in the table, and then use whatever jQuery selector you want on that to filter it down to the result set you want. Then use fnUpdate to update each TR element (or the TD) in turn.

    Regards,
    Allan
  • markstahlermarkstahler Posts: 15Questions: 0Answers: 0
    Thanks a ton Allan. I have made the switch to DataTables from TableSorter.
This discussion has been closed.