Back to Devexpress

GridColumnUnitType Enum

wpf-devexpress-dot-xpf-dot-grid-73eca26a.md

latest1.7 KB
Original Source

GridColumnUnitType Enum

Lists the values that are used to specify the BaseColumn.Width property.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public enum GridColumnUnitType
vb
Public Enum GridColumnUnitType

Members

NameDescription
Pixel

The GridControl sizes the column based on an absolute value in pixels.

| | Star |

The GridControl sizes the column based on a weighted proportion of available space.

| | Auto |

The GridControl sizes the column based on the cell content.

|

The following properties accept/return GridColumnUnitType values:

Remarks

xaml
<dxg:GridControl.Columns>
    <!-- Absolute width in pixels -->
    <dxg:GridColumn FieldName="Name" Width="150"/>
    <!-- Proportional (star) width -->
    <dxg:GridColumn FieldName="Birthday" Width="2*"/>
    <dxg:GridColumn FieldName="Visits" Width="*"/>
    <!-- Auto width -->
    <dxg:GridColumn FieldName="City" Width="Auto"/>    
</dxg:GridControl.Columns>

See Also

DevExpress.Xpf.Grid Namespace