IDataGridLayout Interface
Provides information about a grid’s layout.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v21.2.dll
Declaration
public interface IDataGridLayout
Remarks
Objects that implement the IDataGridLayout interface store information about a grid’s layout for the following events:
- LayoutRestoring - Fires when a grid has been initialized and you can restore its layout (if needed).
- LayoutChanged - Fires when a user changes a grid’s layout.
The code below demonstrates how to save and restore the grid’s layout.
<DxDataGrid ...
LayoutRestoring="@OnLayoutRestoring"
LayoutChanged="@OnLayoutChanged">
</DxDataGrid>
@code {
void OnLayoutChanged(IDataGridLayout dataGridLayout) {
var layout = dataGridLayout.SaveLayout();
// persist the layout in your storage
}
void OnLayoutRestoring(IDataGridLayout dataGridLayout) {
var layout = … // restore layout from your storage
dataGridLayout.LoadLayout(layout);
}
}
See Also