IDataGridLayout.LoadLayout(String) Method

Restores a grid’s layout.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

void LoadLayout(
    string json
)

Parameters

Name Type Description
json String

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

Remarks

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);
    }
}

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

See Also