How to add images in front of treelist control of devexpress?

1.2k Views Asked by At

I have treelist that have four level child nodes.

rootNode->1ChildNode.

1ChildNode->2ChildNode.

2ChildNode->3ChildNode.

Screenshot of treelist I would like to provide image to each node of treelist. I set rootNode.ImageIndex = 0 and clientNode1.ImageIndex = 1 but it didn't work. Also, How can I bold or assign large font to 1ChildNode? Can someone please let me know what I am missing? thank you!

1

There are 1 best solutions below

0
Niranjan Singh On

Refer the documentation of TreeListNode.ImageIndex and TreeListNode.StateImageIndex Property

Select Image source:

The source of select images is specified by the TreeList.SelectImageList property. Certain select images are assigned to nodes by indexes (zero-based integer values referring to images in the SelectImageList).

State Image source:

The source of state images is specified by the TreeList.StateImageList property. Use the StateImageIndex property to associate certain state images from this list with nodes.

You just need to set Selected or State image list property. after that these properties work property. Or you can set image at TreeList.GetSelectImage and TreeList.GetStateImage event.