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

TreeListColumn.UnboundType Property

Gets or sets the data type and binding mode of the column.

Namespace: DevExpress.XtraTreeList.Columns

Assembly: DevExpress.XtraTreeList.v18.2.dll

Declaration

[DefaultValue(UnboundColumnType.Bound)]
[XtraSerializableProperty]
public UnboundColumnType UnboundType { get; set; }

Property Value

Type Default Description
UnboundColumnType **Bound**

A UnboundColumnType value that specifies the data type and binding mode of the column.

Available values:

Name Description
Object

Indicates that the column contains values of any type.

Integer

Indicates that the column contains integer values (the Int32 type).

Decimal

Indicates that the column contains decimal values (the Decimal type).

DateTime

Indicates that the column contains date-time values (the DateTime type).

String

Indicates that the column contains string values (the String type).

Boolean

Indicates that the column contains Boolean values (the Boolean type).

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.

Remarks

You can create unbound columns in the Tree List. These are columns that aren’t bound to any field in the control’s data source (see TreeList.DataSource). Data for unbound columns can be provided using one of two methods:

  • setting a formula (string expression) to the TreeListColumn.UnboundExpression property. In expressions, you can refer to other columns, and use various functions and operators. See Expressions, to learn about the syntax.
  • handling the TreeList.CustomUnboundColumnData event. This event can also be used to save any changes made by an end-user in unbound columns via the Tree List.

To make a column unbound, set its UnboundType property to a UnboundColumnType value that corresponds to the type of data the column will display. For example, if the column is supposed to display integer values, set the UnboundType property to UnboundColumnType.Integer. The data type specified by the UnboundType property determines which editor should be used, by default, to edit the column’s values. In addition, it also determines how values are aligned within the column and which sorting and validity rules should be applied to this column. See the UnboundColumnType topic for information on the available data types for unbound columns.

If the column’s UnboundType property is set to UnboundColumnType.Bound it’s assumed that this column is not unbound and it is bound to a specific field in the data source, specified by the TreeListColumn.FieldName property.

For unbound columns, you need to specify unique field names via the TreeListColumn.FieldName property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.

See Also