DevExpress-Examples / winforms-treelist-display-numbers-in-node-indicator

Display numbers within node indicator cells in the WinForms TreeList control.

Repository from Github https://github.comDevExpress-Examples/winforms-treelist-display-numbers-in-node-indicatorRepository from Github https://github.comDevExpress-Examples/winforms-treelist-display-numbers-in-node-indicator

WinForms TreeList - Display numbers within node indicator cells

This example handles the CustomDrawNodeIndicator event to display numbers within node indicator cells:

private void treeList1_CustomDrawNodeIndicator(object sender, DevExpress.XtraTreeList.CustomDrawNodeIndicatorEventArgs e) {
    TreeList tree = sender as DevExpress.XtraTreeList.TreeList;
    IndicatorObjectInfoArgs args = e.ObjectArgs as IndicatorObjectInfoArgs;
    args.DisplayText = (tree.GetVisibleIndexByNode(e.Node) + 1).ToString();
    e.ImageIndex = -1;
}

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Display numbers within node indicator cells in the WinForms TreeList control.

License:Other


Languages

Language:C# 50.5%Language:Visual Basic .NET 49.5%