Skip to content

Binding to column

In treeviews with columns, every node control must be bound to a column where it will be displayed. To do this, set the ColumnId node control property to a target column's Id property value or set the Column property to a column instance.

Example

NodeTextBox tb = new NodeTextBox();
// bind the node control using the Id column property.
tb.ColumnId = tree.Columns[0].Id;

// bind the node control using the column instance.
TreeColumn col = tree.Columns[0];
tb.AttachToColumn(col);
Dim tb As NodeTextBox = New NodeTextBox()
' bind the node control using the Id column property.
tb.ColumnId = tree.Columns(0).Id

' bind the node control using the column instance.
Dim col As TreeColumn = tree.Columns(0)
tb.AttachToColumn(col)

Note

  • If the treeview doesn't contain columns, you don't need to bind a node control to a column.
  • If you don't bind a node control to a column, it won't be visible in the treeview with columns.

Additional API Reference#

Properties#

  • Visible - node control property that defines whether to display a node control in the treeview.