ASPxGridViewCookiesSettings.StoreColumnsWidth Property
Gets or sets whether a cookie and layout data contain information on a column’s width.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v20.2.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | **true** | true, to add information on a column’s width to a cookie and layout data; otherwise, false. |
Property Paths
You can access this nested property as listed below:
Library | Object Type | Path to StoreColumnsWidth |
---|---|---|
ASP.NET Controls and MVC Extensions | ASPxGridView |
|
GridViewProperties |
|
|
ASP.NET Bootstrap Controls | BootstrapGridView |
|
ASP.NET MVC Extensions | GridViewSettings |
|
GridViewSettings<RowType> |
|
|
MVCxGridView |
|
|
MVCxGridViewProperties |
|
Remarks
When the ASPxGridCookiesSettings.Enabled property is set to true, the StoreColumnsWidth property specifies whether information on a column’s width is saved to a cookie.
Note
If the StoreColumnsWidth property is set to true, the grid requires an additional round trip to the server to persist column widths in cookies. To do this, handle the ASPxClientGridView.ColumnResized event as shown below:
<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False"
ClientInstanceName="grid">
<SettingsBehavior ColumnResizeMode="NextColumn" />
<SettingsCookies Enabled="True" />
<ClientSideEvents ColumnResized="function(s, e) {
e.processOnServer = true;
}" />
</dx:ASPxGridView>
Additionally, the StoreColumnsWidth property specifies whether information on a column’s width is saved to layout data when handling the ASPxGridBase.ClientLayout event or calling the ASPxGridBase.SaveClientLayout method.