Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to reload the data in data table in webix? refresh() is not reloading the data?

Tags:

webix

Given data to the data table, saved its state as "originalState".
"webix.storage.local.put(datatable.getState());"

updated sorting to column & reverted the state to its "originalState". var state = webix.storage.local.get("originalState"); if (state) { datatable.setState(state); }

Every thing is working fine(like column re-ordering, size) but the data that was sorted earlier is not being reset to its original data. Still its is showing the sorted data only. Tried refresh() but still it is same.

like image 976
balusu Avatar asked Nov 26 '14 05:11

balusu


1 Answers

There is no way to revert table back to unsorted state You can apply some saved sorting, but you can not "unsort" the table.

table.refresh() will only repaint the data in the datatable, it doesn't have any other means If you need a real data reloading from remote datasource, you need to use

table.clearAll()
table.load(data_url);
like image 154
Aquatic Avatar answered Sep 23 '22 19:09

Aquatic