I am looking to be able to allow end user to save the state of the datagrid. In other words, I would like to save column order, visibility, sorting, freezing, etc so that a user can save this state and then change/flip between saved states.
The DataGrid doesn’t currently support saving and restoring view states out of the box, but it’s definitely possible to build this using your own logic.
You’d need to:
• Track things like column order, visibility, sorting, freezing, etc. in variables
• Store those variables in your backend (e.g. Supabase or Xano)
• On page load or when switching views, apply those saved settings back to the DataGrid dynamically
So yes, it’s doable, but it requires creating your own system around it.
@Agustin_Carozo - Thank you for the reply! I am using initial filters and they aren’t influencing the order of columns. Can you detail how this is done?
You need to input an array, and every object in that array represents a column, and the order inside that array will dictacte which column comes first.
So you’ll probably need to save the entire array inside a variable to lock the order