IDataGridLayout Interface

Provides information about a grid's layout.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

public interface IDataGridLayout

Remarks

Objects that implement the IDataGridLayout interface provide 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