Skip to main content

DxDataGrid<T>.LoadLayout(String) Method

Restores a grid’s layout.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll


public void LoadLayout(
    string layout


Name Type Description
layout String

A JSON string returned by the SaveLayout() method with grid layout data.



The Data Grid was moved to maintenance support mode. No new features/capabilities will be added to this component. We recommend that you migrate to the Grid component.

Use the LoadLayout method to restore a previously-saved grid’s layout.The layout information includes the current page, column sort order/direction, column position, filter values, and grouped columns.


The saved layout does not include information about expanded rows in groups.

The DxDataGrid<T> also contains the following save/restore layout 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 ...

@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

View Example: Blazor Data Grid - How to save/load a grid's layout information

See Also