Skip to main content
A newer version of this page is available. .
Tab

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.v18.2.dll

Declaration

[DefaultValue(true)]
public bool StoreColumnsWidth { get; set; }

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 Bootstrap Controls BootstrapGridView
.SettingsCookies.StoreColumnsWidth
ASP.NET Web Forms Controls ASPxGridView
.SettingsCookies.StoreColumnsWidth
GridViewProperties
.SettingsCookies.StoreColumnsWidth
GridViewSettings
.SettingsCookies.StoreColumnsWidth
GridViewSettings<RowType>
.SettingsCookies.StoreColumnsWidth
MVCxGridView
.SettingsCookies.StoreColumnsWidth
MVCxGridViewProperties
.SettingsCookies.StoreColumnsWidth

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.

See Also