Am using version 19.2.51.
I persist the grid data like this:
let persistGridData = this.$refs.reportGrid.ej2Instances.getPersistData();
window.localStorage.setItem("GridData", persistGridData);And I assign it back to the grid like this:
let savedPersistGridData = window.localStorage.getItem("GridData");
if (savedPersistGridData) {
grid.ej2Instances.setProperties(JSON.parse(savedPersistGridData)); }Now that second bit of code is called multiple times. Each time the user asks for some new data, the grid dataSource is set to the new items and then this code is called to make sure the autogenerated columns match what the user had re-arranged previously. All works wonderfully.
Except...
when I set a filter on a column. The filter is applied on the grid and I persist the grid details. If I refresh the page and call the setProperties on the first set of data, it is displayed with the filter applied as required. However, if I ask for new data and call setProperties again then I get an error:
vue.js:1897 TypeError: Cannot read property 'querySelector' of undefined at e.addFilteredClass (ej2-vue.min.js:1) at e.refreshFilterIcon (ej2-vue.min.js:1) at e.updateFilter (ej2-vue.min.js:1) at e.onPropertyChanged (ej2-vue.min.js:1) at e.notify (ej2-vue.min.js:1) at t.notify (ej2-vue.min.js:1) at t.extendedPropertyChange (ej2-vue.min.js:1) at t.onPropertyChanged (ej2-vue.min.js:1) at t.e.dataBind (ej2-vue.min.js:1) at t.dataBind (ej2-vue.min.js:1)This only occurs if i have a filter property set.
Regards
Je