jeffreydwalter / ColReorderWithResize

Column reordering and resizing plug-in for DataTables
http://www.datatables.net/
MIT License
42 stars 51 forks source link

Save state between client sessions #13

Closed KoldoRamirez closed 5 years ago

KoldoRamirez commented 6 years ago

I think it would be useful to have a kind of stateSave option to save columns width and location between client sessions.

jeffreydwalter commented 5 years ago

@KoldoRamirez you can do that using stateSave. You just have serialize the column metadata and to persist it on the server.

jeffreydwalter commented 5 years ago

Another way is to turn saveState off and persist it yourself via ajax.

e88y commented 5 years ago

Another way is to turn saveState off and persist it yourself via ajax.

could you provide a example on how to restore the columns?

jeffreydwalter commented 5 years ago

@e88y take a look at the dataTables documentation: https://datatables.net/reference/option/stateSave