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

TreeListColumn.ColumnHandle Property

Gets the position of the associated field within the data source.

Namespace: DevExpress.XtraTreeList.Columns

Assembly: DevExpress.XtraTreeList.v19.1.dll

Declaration

[Browsable(false)]
public int ColumnHandle { get; }

Property Value

Type Description
Int32

An integer value representing the zero-based index of the corresponding field within the data source.

Remarks

When the Tree List control is in the bound mode, it can display field values from the associated data source by means of columns. Columns can be bound to data source fields via the TreeListColumn.FieldName property. If a column is bound to a field, the ColumnHandle property returns the index of the bound field within the associated data source. Otherwise, it returns -1.

When working in unbound mode, the TreeList.DataSource property is set to null (Nothing in Visual Basic). Hence, columns are not bound to any field. The ColumnHandle property of any column returns -1 in this case.

You can use the TreeList.GetColumnByColumnHandle method to obtain the column object specified its handle.

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