Tab
A newer version of this page is available. Switch to the current version.

WebColumnBase.Width Property

Gets or sets the column's width.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(typeof(Unit), "")]
public virtual Unit Width { get; set; }
<DefaultValue(GetType(Unit), "")>
Public Overridable Property Width As Unit

Property Value

Type Default Description
Unit

String.Empty

A Unit structure that represents the column's width.

Remarks

The Width property specifies the width for the WebColumnBase class's derived objects. The WebColumnBase class serves as a base class for the following objects:

  • WebForms and MVC Grid-like components' columns
  • Gantt columns
  • ListBox columns
  • and others

Example

ASPxGridView:

<dx:ASPxGridView ID="Grid" runat="server" >
    <Columns>
        <dx:GridViewDataColumn FieldName="ContactName" Width="150" FixedStyle="Left" />
        <dx:GridViewDataColumn FieldName="CompanyName" Width="180" FixedStyle="Left" />
        <dx:GridViewDataColumn FieldName="City" Width="130" />
        ...
    </Columns>
</dx:ASPxGridView>

ASPxListBox:

<dx:ASPxListBox ID="lbModels" runat="server" ...>
    <Columns>
        <dx:ListBoxColumn FieldName="Name" Caption="Model" Width="100%" />
        <dx:ListBoxColumn FieldName="Price" Width="50px" />
    </Columns>
</dx:ASPxListBox>
See Also