Skip to main content
Tab

ASPxClientLayoutArgs.LayoutMode Property

Indicates whether a control’s layout should be saved or restored.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

public ClientLayoutMode LayoutMode { get; }

Property Value

Type Description
ClientLayoutMode

A ClientLayoutMode enumeration value that indicates whether a web control’s layout should be saved or restored.

Available values:

Name Description
Loading

A web control’s ClientLayout event should be handled to restore the previously saved layout.

Saving

A web control’s ClientLayout event should be handled to save the control’s layout to a data store.

Remarks

protected void ASPxDockManager1_ClientLayout(object sender, ASPxClientLayoutArgs e) {
    if (e.LayoutMode == ClientLayoutMode.Saving && this.saveLayout) {
        DataRow row = LayoutDataSource.NewRow();
        row["Date"] = DateTime.Now.ToString();
        row["LayoutString"] = e.LayoutData;
        LayoutDataSource.Rows.Add(row);
    }
    if (e.LayoutMode == ClientLayoutMode.Loading && grid.Selection.Count != 0) {
        e.LayoutData = grid.GetSelectedFieldValues("LayoutString")[0].ToString();
    }
}
See Also