Detecting if a row is visible at the backend?

Detecting if a row is visible at the backend?

akshay3004akshay3004 Posts: 7Questions: 0Answers: 0
edited April 2012 in General
I have a table which has lots of columns but most of them are hidden at the beginning. The user depending on his needs can toggle any of them to being visible. I am fetching data for each action from the server-side. Is there any way that I can know at the server side, which columns are visible, so that when the table is rendered again it has those columns as visible?

Replies

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin
    By default DataTables doesn't send that information, but you can easily add it by using fnServerParams to add the required parameters. You would need to loop through fnSettings().aoColumns[].bVisible to get the state of each column.

    Allan
  • akshay3004akshay3004 Posts: 7Questions: 0Answers: 0
    Yep, that works. Thanks allan
This discussion has been closed.