Class DataGridSerializationController
Represents a controller that is used to perform serialize and deserialize operations in SfDataGrid.
Inheritance
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public class DataGridSerializationController : Object
Constructors
DataGridSerializationController(SfDataGrid)
Initializes a new instance of DataGridSerializationController class.
Declaration
public DataGridSerializationController(SfDataGrid grid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | grid | The SfDataGrid. |
Properties
Datagrid
Gets the reference to the SfDataGrid control.
Declaration
public SfDataGrid Datagrid { get; }
Property Value
Type |
---|
SfDataGrid |
Methods
Deserialize(Stream, DataGridDeserializationOptions)
Deserializes the SfDataGrid based on the XML document contained by the specified Stream and deserializeOptions.
Declaration
public virtual void Deserialize(Stream stream, DataGridDeserializationOptions deserializeOptions)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Contains the XML document to deserialize. |
DataGridDeserializationOptions | deserializeOptions | Specifies the DataGridDeserializationOptions to decide the type of grid operations such as sorting ,filtering ,and etc to be deserialized. |
GetColumn(SerializableDataGridColumn)
Gets the column from the SerializableDataGridColumn during serialization process.
Declaration
protected virtual DataGridColumn GetColumn(SerializableDataGridColumn serializableColumn)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGridColumn | serializableColumn | The serializable column to get its grid column. |
Returns
Type | Description |
---|---|
DataGridColumn | Returns the DataGridColumn. |
Remarks
Override this method to get the custom column during deserialization process.
GetSerializableColumn(DataGridColumn)
Gets the SerializableDataGridColumn instance while serializing the SfDataGrid.
Declaration
protected virtual SerializableDataGridColumn GetSerializableColumn(DataGridColumn column)
Parameters
Type | Name | Description |
---|---|---|
DataGridColumn | column | The corresponding column to get serializable grid column. |
Returns
Type | Description |
---|---|
SerializableDataGridColumn | Returns the SerializableDataGridColumn instance for the specified grid column |
Remarks
You can use this method while serializing the custom column.
GetSerializableDataGrid()
Gets the new instance of SerializableDataGrid while serializing the SfDataGrid.
Declaration
protected virtual SerializableDataGrid GetSerializableDataGrid()
Returns
Type | Description |
---|---|
SerializableDataGrid | The new instance of SerializableDataGrid. |
Remarks
If you need to serialize the custom SfDataGrid properties, you should add these properties to custom SerializableDataGrid class.
KnownTypes()
Gets the known column types to serialize and deserialize the columns in SfDataGrid.
Declaration
public virtual Type[] KnownTypes()
Returns
Type | Description |
---|---|
System.Type[] | Returns the corresponding column type. |
Remarks
If you want to serialize the custom columns, its types should be added in the returned Type Array.
ReloadGrid(SerializableDataGrid, DataGridDeserializationOptions)
Reloads the grid properties from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization.
Declaration
protected virtual void ReloadGrid(SerializableDataGrid dataGrid, DataGridDeserializationOptions deserializationOptions)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | dataGrid | The corresponding SerializableDataGrid to restore the grid settings. |
DataGridDeserializationOptions | deserializationOptions | The deserialization options. |
RestoreCaptionSummaryRow(SerializableDataGrid, DataGridDeserializationOptions)
Restores the caption summary row settings from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreCaptionSummaryRow(SerializableDataGrid serializableDataGrid, DataGridDeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding serializable DataGrid to restore the caption summary row settings. |
DataGridDeserializationOptions | options | Specifies the options for deserializing the caption summary row. |
RestoreColumnProperties(SerializableDataGridColumn, DataGridColumn)
Restores the grid column properties from the specified SerializableDataGridColumn to the DataGridColumn during deserialization.
Declaration
protected virtual void RestoreColumnProperties(SerializableDataGridColumn serializableColumn, DataGridColumn column)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGridColumn | serializableColumn | The corresponding SerializableGridColumn to restore the grid column properties. |
DataGridColumn | column | The corresponding column to restore its properties for deserialization. |
RestoreColumns(SerializableDataGrid, DataGridDeserializationOptions)
Restores the columns from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreColumns(SerializableDataGrid serializableDataGrid, DataGridDeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | Restores the columns settings from the SerializableDataGrid. |
DataGridDeserializationOptions | options | Contains the deserialization options. |
RestoreDataGridProperties(SerializableDataGrid)
Restores the SfDataGrid properties from the specified SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreDataGridProperties(SerializableDataGrid serializableDataGrid)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding serializable DataGrid to restore DataGrid properties for deserialization. |
RestoreDataGridSettings(SerializableDataGrid, SfDataGrid, DataGridDeserializationOptions)
Restores the SfDataGrid settings from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreDataGridSettings(SerializableDataGrid serializableDataGrid, SfDataGrid dataGrid, DataGridDeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding serializable DataGrid to restore the grid settings. |
SfDataGrid | dataGrid | The corresponding SfDataGrid to deserialize its settings. |
DataGridDeserializationOptions | options | Specifies the DataGridDeserializationOptions for deserializing the grid settings. |
RestoreDetailsViewDefinition(SerializableDataGrid, DataGridDeserializationOptions)
Restores the DetailsViewDefinition settings from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreDetailsViewDefinition(SerializableDataGrid serializableDataGrid, DataGridDeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding SerializableDataGrid to restore the DetailsViewDefinition settings. |
DataGridDeserializationOptions | options | The deserialization options. |
RestoreGroupColumnDescriptions(SerializableDataGrid, DataGridDeserializationOptions)
Restores the group column descriptions from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreGroupColumnDescriptions(SerializableDataGrid serializableDataGrid, DataGridDeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The serializable DataGrid to deserialize the group column descriptions. |
DataGridDeserializationOptions | options | Specifies the options for deserializing the group column descriptions. |
RestoreGroupSummaryRows(SerializableDataGrid, DataGridDeserializationOptions)
Restores the group summary rows settings from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreGroupSummaryRows(SerializableDataGrid serializableDataGrid, DataGridDeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding serializable DataGrid to restore the group summary rows settings. |
DataGridDeserializationOptions | options | Specifies the options for deserializing the group summary rows. |
RestoreSortColumnDescriptions(SerializableDataGrid, DataGridDeserializationOptions)
Restores the sort column descriptions settings from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreSortColumnDescriptions(SerializableDataGrid serializableDataGrid, DataGridDeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The serializable DataGrid to deserialize the sort column descriptions. |
DataGridDeserializationOptions | options | Specifies the options for deserializing the sort column descriptions. |
RestoreStackedHeaderRows(SerializableDataGrid, DataGridDeserializationOptions)
Restores the stacked header rows settings from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreStackedHeaderRows(SerializableDataGrid serializableDataGrid, DataGridDeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding SerializableDataGrid to restore the stacked header rows settings. |
DataGridDeserializationOptions | options | The deserialization options. |
RestoreSummaryRow(SerializableDataGridSummaryRow, DataGridSummaryRow)
Restores the summary row settings from the SerializableDataGridSummaryRow with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual DataGridSummaryRow RestoreSummaryRow(SerializableDataGridSummaryRow gridSummaryRow, DataGridSummaryRow summaryRow = null)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGridSummaryRow | gridSummaryRow | The corresponding SerializableSummaryRow to restore the summary row settings. |
DataGridSummaryRow | summaryRow | The corresponding summary row to restore its settings for deserialization. |
Returns
Type | Description |
---|---|
DataGridSummaryRow | Returns the DataGridSummaryRow. |
RestoreTableSummaryRows(SerializableDataGrid, DataGridDeserializationOptions)
Restores the table summary rows settings from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreTableSummaryRows(SerializableDataGrid serializableDataGrid, DataGridDeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding SerializableDataGrid to restore the table summary rows settings. |
DataGridDeserializationOptions | options | Specifies the options for deserializing the table summary rows. |
RestoreUnboundRows(SerializableDataGrid, DataGridDeserializationOptions)
Restores the unbound rows settings from the SerializableDataGrid with the specified DataGridDeserializationOptions during deserialization process.
Declaration
protected virtual void RestoreUnboundRows(SerializableDataGrid serializableDataGrid, DataGridDeserializationOptions options)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding SerializableDataGrid to restore the unbound rows settings. |
DataGridDeserializationOptions | options | The deserialization options. |
Serialize(Stream, DataGridSerializationOptions)
Serializes the SfDataGrid with specified options to the XML document file that are stored in the specified Stream.
Declaration
public virtual void Serialize(Stream stream, DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | |
DataGridSerializationOptions | serializeOptions |
StoreCaptionSummaryRow(SerializableDataGrid, DataGridSummaryRow, DataGridSerializationOptions)
Stores the specified caption summary row property settings to the SerializableDataGrid with specified DataGridSerializationOptions during serialization process.
Declaration
protected virtual void StoreCaptionSummaryRow(SerializableDataGrid serializableDataGrid, DataGridSummaryRow gridSummaryRow, DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding SerializableDataGrid to store the caption summary row property settings for serialization. |
DataGridSummaryRow | gridSummaryRow | The corresponding GridSummaryRow to store its settings. |
DataGridSerializationOptions | serializeOptions | The corresponding serialization options. |
StoreColumnProperties(DataGridColumn, SerializableDataGridColumn)
Stores the DataGridColumn properties to the specified SerializableDataGridColumn during serialization process.
Declaration
protected virtual void StoreColumnProperties(DataGridColumn column, SerializableDataGridColumn serializableColumn)
Parameters
Type | Name | Description |
---|---|---|
DataGridColumn | column | The corresponding column to store it property settings for serialization. |
SerializableDataGridColumn | serializableColumn | The corresponding SerializableGridColumn where the column properties are stored. |
StoreColumns(SfDataGrid, DataGridSerializationOptions)
Stores the columns settings of SfDataGrid to SerializableColumns with the specified DataGridSerializationOptions during serialization process.
Declaration
protected virtual SerializableColumns StoreColumns(SfDataGrid dataGrid, DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The corresponding dataGrid to store its columns settings for serialization. |
DataGridSerializationOptions | serializeOptions | The corresponding serialization options. |
Returns
Type | Description |
---|---|
SerializableColumns | Returns the SerializableColumns that contains the specified property settings of columns. |
StoreDataGridProperties(SerializableDataGrid)
Stores the SfDataGrid properties to SerializableDataGrid during serialization process.
Declaration
protected virtual void StoreDataGridProperties(SerializableDataGrid serializableDataGrid)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding SerializableDataGrid to store SfDataGrid properties settings. |
StoreDataGridSettings(DataGridSerializationOptions)
Stores the SfDataGrid settings with the specified DataGridSerializationOptions to SerializableDataGrid.
Declaration
protected virtual SerializableDataGrid StoreDataGridSettings(DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
DataGridSerializationOptions | serializeOptions | Specifies the serialization options to store grid settings. |
Returns
Type | Description |
---|---|
SerializableDataGrid | Returns the SerializableDataGrid with grid settings. |
StoreDetailsViewDefinition(SerializableDataGrid, DetailsViewDefinition, DataGridSerializationOptions)
Stores the specified DetailsViewDefinition settings to SerializableDataGrid with the specified DataGridSerializationOptions during serialization process.
Declaration
protected virtual void StoreDetailsViewDefinition(SerializableDataGrid serializableDataGrid, DetailsViewDefinition detailsViewDefinition, DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding SerializableDataGrid to store the DetailsViewDefinition settings. |
DetailsViewDefinition | detailsViewDefinition | The corresponding detailsViewDefinition that need to be stored in to serializableDataGrid for serializing DetailsViewDefinition. |
DataGridSerializationOptions | serializeOptions | The corresponding serialization options. |
StoreGroupColumnDescriptions(SfDataGrid, DataGridSerializationOptions)
Stores the group column descriptions to SerializableGroupColumnDescriptions with the specified DataGridSerializationOptions during serialization process.
Declaration
protected virtual SerializableGroupColumnDescriptions StoreGroupColumnDescriptions(SfDataGrid dataGrid, DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The corresponding SfDataGrid to serialize its group column descriptions. |
DataGridSerializationOptions | serializeOptions | The corresponding serialization options. |
Returns
Type | Description |
---|---|
SerializableGroupColumnDescriptions | Returns the SerializableGroupColumnDescriptions that contains the specified group column descriptions in SfDataGrid. |
StoreGroupSummaryRows(SerializableDataGrid, ObservableCollection<DataGridSummaryRow>, DataGridSerializationOptions)
Stores the property settings of group summary rows to the SerializableDataGrid with the specified DataGridSerializationOptions during serialization process.
Declaration
protected virtual void StoreGroupSummaryRows(SerializableDataGrid serializableDataGrid, ObservableCollection<DataGridSummaryRow> groupSummaryrows, DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding SerializableDataGrid to store the group summary rows property settings. |
System.Collections.ObjectModel.ObservableCollection<DataGridSummaryRow> | groupSummaryrows | The collection of grid summary rows that need to be stored in to serializableDataGrid for serializing group summary rows. |
DataGridSerializationOptions | serializeOptions | The corresponding serialization options. |
StoreSortColumnDescriptions(SfDataGrid, DataGridSerializationOptions)
Stores the sort column descriptions to SerializableSortColumnDescriptions with the specified DataGridSerializationOptions during serialization process.
Declaration
protected virtual SerializableSortColumnDescriptions StoreSortColumnDescriptions(SfDataGrid dataGrid, DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The corresponding SfDataGrid to serialize its sort column descriptions property settings. |
DataGridSerializationOptions | serializeOptions | The corresponding serialization options. |
Returns
Type | Description |
---|---|
SerializableSortColumnDescriptions | Returns the SerializableSortColumnDescriptions that contains the specified sort column descriptions in SfDataGrid. |
StoreStackedHeaderRow(SerializableDataGrid, ObservableCollection<DataGridStackedHeaderRow>, DataGridSerializationOptions)
Stores the specified DataGridStackedHeaderRows settings to SerializableDataGrid with the specified DataGridSerializationOptions during serialization process..
Declaration
protected virtual void StoreStackedHeaderRow(SerializableDataGrid serializableDataGrid, ObservableCollection<DataGridStackedHeaderRow> stackedHeaderRows, DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding serializable DataGrid to store the grid stacked header rows. |
System.Collections.ObjectModel.ObservableCollection<DataGridStackedHeaderRow> | stackedHeaderRows | The corresponding stacked header rows that need to be copied to serializable DataGrid for serialization. |
DataGridSerializationOptions | serializeOptions | The corresponding serialization options. |
StoreSummaryRow(DataGridSummaryRow, SerializableDataGridSummaryRow)
Stores the specified DataGridSummaryRow settings to the SerializableDataGrid with the specified DataGridSerializationOptions during serialization process.
Declaration
protected virtual SerializableDataGridSummaryRow StoreSummaryRow(DataGridSummaryRow gridSummaryRow, SerializableDataGridSummaryRow serializableSummaryRow = null)
Parameters
Type | Name | Description |
---|---|---|
DataGridSummaryRow | gridSummaryRow | The corresponding grid summary row to store its settings. |
SerializableDataGridSummaryRow | serializableSummaryRow | The corresponding SerializableGridSummaryRow to store the settings of grid summary row. |
Returns
Type | Description |
---|---|
SerializableDataGridSummaryRow | Returns the SerializableDataGridSummaryRow contains the GridSummaryRow settings for serialization. |
StoreTableSummaryRows(SerializableDataGrid, ObservableCollection<DataGridTableSummaryRow>, DataGridSerializationOptions)
Stores the property settings of table summary rows to the SerializableDataGrid with the specified DataGridSerializationOptions during serialization process.
Declaration
protected virtual void StoreTableSummaryRows(SerializableDataGrid serializableDataGrid, ObservableCollection<DataGridTableSummaryRow> tableSummaryRows, DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding SerializableDataGrid to store the table summary rows settings. |
System.Collections.ObjectModel.ObservableCollection<DataGridTableSummaryRow> | tableSummaryRows | The collection of table summary rows that need to be stored in to SerializableDataGrid for serializing table summary rows. |
DataGridSerializationOptions | serializeOptions | The corresponding serialization options. |
StoreUnboundRows(SerializableDataGrid, DataGridUnboundRows, DataGridSerializationOptions)
Stores the property settings of unbound rows to the SerializableDataGrid with the specified DataGridSerializationOptions during serialization process.
Declaration
protected virtual void StoreUnboundRows(SerializableDataGrid serializableDataGrid, DataGridUnboundRows gridUnboundRows, DataGridSerializationOptions serializeOptions)
Parameters
Type | Name | Description |
---|---|---|
SerializableDataGrid | serializableDataGrid | The corresponding serializableDataGrid to store the unbound rows settings. |
DataGridUnboundRows | gridUnboundRows | The corresponding unbound rows that need to be stored in to SerializableDataGrid for serializing unbound rows. |
DataGridSerializationOptions | serializeOptions | The corresponding serialization options. |
UnWireSerializablePropertyEvents()
Unwires the events associates with the serializable property.
Declaration
protected virtual void UnWireSerializablePropertyEvents()
WireSerializablePropertyEvents()
Wires the events associates with the serializable property.
Declaration
protected virtual void WireSerializablePropertyEvents()