ASPxClientLayoutArgs.LayoutMode Property
In This Article
Indicates whether a control’s layout should be saved or restored.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public ClientLayoutMode LayoutMode { get; }
#Property Value
Type | Description |
---|---|
Client |
A Client |
Available values:
Name | Description |
---|---|
Loading | A web control’s Client |
Saving | A web control’s Client |
#Remarks
C#
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