Hi Shwe,
Thank you for contacting Syncfusion support.
We have analyzed your query and you can achieve your
requirement by using Serialization and Deserialization support. You can save
the changes by using dataGrid.Model.Serialize method and you can reload that
changes by using dataGrid.Model.Deserialize method. Please refer the below code
snippet to achieve your requirement.
In this code snippet we have serialize the grid using Button
click event. You can use this Serialize method to your application, where you
want to serialize the grid and for
reloading, you can handle datagrid.Loaded event, within this event you can call
Deserialize method.
C# code snippet:
private void
serialization_Click(object sender, RoutedEventArgs e)
{
this.dataGrid.Model.Serialize("Files.xml");
this.mainwindow.Close();
}
void dataGrid_Loaded(object sender, RoutedEventArgs e)
{
if (File.Exists("Files.xml"))
this.dataGrid.Model.Deserialize("Files.xml");
}
|
Please let us know if you require
further assistance.
Thanks,
Ashok