Column data type not refelcted after change in Persistence enabled Grid

We have persistence enabled  in a Data grid. When we changed one of data column type from datetime to date, it is not reflected in UI even after clearing cache, browser history.

It is working only if we turn off persistence or open browser in private mode.

Please suggest a fix




Attachment: Column_type_in_persistent_grid_f35c9131.zip

1 Reply 1 reply marked as answer

VS Vikram Sundararajan Syncfusion Team June 25, 2024 01:11 PM UTC

Hi Mahesh Machina,


Greetings from Syncfusion support,


Based on your query regarding working with Syncfusion EJ2 Grid with persistence enabled, changing the column data type directly does not reflect in the UI. We would like to inform you that once the Grid is rendered with initial settings when enablePersistence is true, you can add or remove columns from the Grid only by using the Grid's built-in methods. If you change the column type manually in the column definition after the Grid initialization, the changes will not be reflected and updated in the Grid model. To reflect our changes in the Grid, we first need to notify the Grid model. This was the default behavior of our Grid.


Please refer below sample and documentation for more reference,


Sample: https://stackblitz.com/edit/74h6g1-mjyybi?file=index.js,index.html


Documentation: https://ej2.syncfusion.com/javascript/documentation/grid/state-management#add-a-new-column-in-persisted-columns-list


Additionally, we suggest you reset the settings or change the grid ID to ensure the changes are properly reflected.


Please feel free to get back us for further assistance.


Regards,

Vikram S.


Marked as answer
Loader.
Up arrow icon