Back to Devexpress

ColumnBase.UnboundType Property

wpf-devexpress-dot-xpf-dot-grid-dot-columnbase-04a7e32b.md

latest7.0 KB
Original Source

ColumnBase.UnboundType Property

Gets or sets the column’s data type and binding mode. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
[Browsable(false)]
[DefaultValue(UnboundColumnType.Bound)]
public UnboundColumnType UnboundType { get; set; }
vb
<DefaultValue(UnboundColumnType.Bound)>
<Browsable(False)>
Public Property UnboundType As UnboundColumnType

Property Value

TypeDefaultDescription
UnboundColumnTypeBound

The column’s data type and binding mode.

|

Available values:

NameDescription
Bound

Indicates that the column is bound to a field in the control’s underlying data source. The type of data this column contains is determined by the bound field.

| | Integer |

Indicates that the column is unbound and it contains integer values (the Int32 type).

| | Decimal |

Indicates that the column is unbound and it contains decimal values (the Decimal type).

| | DateTime |

Indicates that the column is unbound and it contains date/time values (the DateTime type).

| | String |

Indicates that the column is unbound and it contains string values (the String type).

| | Boolean |

Indicates that the column is unbound and it contains Boolean values (the Boolean type).

| | Object |

Indicates that the column is unbound and it contains values of any type. A TextEdit editor is assigned for the in-place editing of such a column.

|

Remarks

Note

This property is obsolete. Use the ColumnBase.UnboundDataType property instead to make a column unbound and specify the column’s data type.

Refer to the following help topic for more information: Unbound Columns.

The following code snippets (auto-collected from DevExpress Examples) contain references to the UnboundType property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-display-datetime-value-in-separate-date-and-time-columns/CS/DateAndTimeColumns_Unbound/MainWindow.xaml#L17

xml
<dxg:GridControl.Columns>
    <dxg:GridColumn FieldName="Date" Header="Date" UnboundType="DateTime" UnboundExpression="GetDate([DateTime])" AllowEditing="False"/>
    <dxg:GridColumn FieldName="Time" Header="Time" UnboundType="DateTime" UnboundExpression="AddTicks(Today(), GetTimeOfDay([DateTime]))" AllowEditing="False" RoundDateTimeForColumnFilter="False">

wpf-data-grid-create-unbound-columns/CS/DXGrid_UnboundColumns_CodeBehind/Window1.xaml#L17

xml
<dxg:GridColumn FieldName="Quantity"/>
<dxg:GridColumn FieldName="Total" UnboundType="Boolean" ReadOnly="True">
    <dxg:GridColumn.EditSettings>

wpf-data-grid-display-icon-in-unbound-column-based-on-value-in-bound-column/CS/UnboundColumnWithIcons_CodeBehind/Window1.xaml#L18

xml
<dxg:GridColumn FieldName="Action" />
    <dxg:GridColumn FieldName="IconUnbound" UnboundType="Object" CellTemplate="{StaticResource IconCellTemplate}" />
</dxg:GridControl.Columns>

wpf-datagrid-round-decimal-values/CS/FilterDuplicateRecords_UnboundEditable/MainWindow.xaml#L19

xml
<dxg:GridColumn FieldName="Name"/>
    <dxg:GridColumn Header="Growth" FieldName="GrowthUnbound" UnboundType="Decimal"/>
</dxg:GridControl.Columns>

wpf-data-grid-export-data-to-native-excel-table/CS/WpfApplication80/MainWindow.xaml#L15

xml
<dxg:GridColumn FieldName="MaxValue"/>
<dxg:GridColumn FieldName="Average" UnboundType="Integer" UnboundExpression="([MinValue]+[MaxValue])/2"/>
<dxg:GridControl.View>

wpf-data-grid-change-background-color-for-modified-cells/CS/HighlightChangedCellBehavior.cs#L71

csharp
unboundColumn.FieldName = UnboundColumnPrefix + column.FieldName;
unboundColumn.UnboundType = UnboundColumnType.Boolean;
unboundColumn.Visible = false;

wpf-data-grid-change-background-color-for-modified-cells/VB/HighlightChangedCellBehavior.vb#L93

vb
unboundColumn.FieldName = HighlightModifiedCells.ChangedCellsHighlightBehavior.UnboundColumnPrefix & column.FieldName
unboundColumn.UnboundType = DevExpress.Data.UnboundColumnType.[Boolean]
unboundColumn.Visible = False

See Also

CustomUnboundColumnData

Unbound Columns

ColumnBase Class

ColumnBase Members

DevExpress.Xpf.Grid Namespace