The requested page is not available for the requested platform. You are viewing the content for Default platform.

GridColumn.Width Property

Gets or sets the column width. This is a bindable property.

Namespace: DevExpress.Mobile.DataGrid

Assembly: DevExpress.Mobile.Grid.v18.2.dll

Declaration

[XtraSerializableProperty]
public double Width { get; set; }
<XtraSerializableProperty>
Public Property Width As Double

Property Value

Type Description
Double

A Double value that specifies the column width in density-independent pixels.

Remarks

Important

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

Use the Width property to specify the column width.

The property behavior depends on whether or not the horizontal scrolling is enabled.

The Horizontal Scrolling is Enabled

The required column's width is automatically set to the Width property's value.

The Horizontal Scrolling is Disabled

Column widths are adjusted automatically, so that the total width of all columns matches the grid width. Changing the width of one column automatically changes the widths of other columns. To obtain the actual width of columns, use their GridColumn.ActualWidth property.

If you set the Width property only for one column, and there are other columns that don't have this property defined, the GridControl will set your required width value for this column and decrease the widths of columns where the width isn't set. However, if you set the Width for all columns, or if certain columns whose width is not defined already reached their GridColumn.MinWidth value, the GridControl will modify the width of all other columns in proportion to their defined Width, but will set it to a value not less than MinWidth.

See Also