Thank you for writing.
If you have a populated ImageList
and you have a column in the data source which holds an index valid for the ImageList
, you can access this column value through the DataBoundItem
property of RadTreeNode
. Here is an example, where I am setting the ImageIndex
of a node to the value that the first column of the data row returns (it is ID and holds the index):
sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e)
DataRowView dataRowView = e.Node.DataBoundItem
e.Node.ImageIndex = Convert.ToInt32(dataRowView);
I hope this helps.
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download
; also available is the Q2'11 Roadmap
for Telerik Windows Forms controls.