Show SfDataGrid same as last SfDataGrid customize view

Hi dears,

Is there a way to show SfDataGrid same as last customize view?

for example :

when user run my app first time, SfDataGrid has some columns, and user change column order or column size or hide some columns in run time view.

I want to When user  run my app again, SfDataGrid show same as last time  that user changed (with column order and column size and hidden columns). Is it possible?


1 Reply

DM Dhanasekar Mohanraj Syncfusion Team April 25, 2022 02:02 PM UTC

Hi Hossein,

You can achieve your requirement by using Serialization and Deserialization in SfDataGrid.
Once you have done the needed operation in your application and perform serialization, then when you are opening your application, perform deserialization it will show the serialized datagrid depends on its properties.

We have prepared the sample based on your requirement. Please check this and revert us if you need further assistance.

Please refer the below UG documentation for more information.

UG link : Serialization in WPF DataGrid Control | Syncfusion.

Regards,
Dhanasekar M.


Attachment: Sample_399a0e44.zip

Loader.
Up arrow icon