Saving datagrid settings

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.

Is this supported by the weweb datagrid?

Hi Pinball :waving_hand:

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.

Hi @Agustin_Carozo! What variable can you use to track the order of the columns, is it built in?

You could try using “Initial Sort” Data Grid | Documentation

@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

Apologies for the delay in responding.

Not the answer I was hoping for, but I appreciate you suggesting a way to do it myself. I will give it a try!