Save different views of a table

Save different views of a table

SabineSabine Posts: 2Questions: 0Answers: 0
edited November 2013 in DataTables 1.9
Hello,

I would like to use DataTables in an ASP.net MVC project.

I know that I can save the state of the table in a cookie. My question is, whether it is posible or not to save the state of the table (this means the width of the columns and the choosen columns and their order) at the server.
Our user should be able to save different views of the table and change to this views directly.

Thanks, Sabine

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Yes, have a look at the fnStateSave and fnStateLoad examples in the documentation to see how it might be done. Having said that, that's for the latest state only - you would need to get the current state from the table if you want to save that at any particular point. For that you'll probably need to hack DataTables a little since that information isn't currently available through the API.

    In 1.10 (which is pre-beta if you want to try it) the API does have all the information needed, but you'd need to call a few different methods to get it.

    So, yes, possible, no, not trivial!

    Allan
  • SabineSabine Posts: 2Questions: 0Answers: 0
    Great. So I will give it a try.

    Thanks, Sabine
This discussion has been closed.