We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Set TreeNodeAdv Backgroundcolor?

Hello,

is there a way to set the backgroundcolor of a treenodeadv at runtime?
I'd like to set different backgroundcolors to the nodes in my treeview.

Thanks

1 Reply

BA Berkunath A Syncfusion Team September 14, 2012 12:02 PM UTC

Hi Fabian ,

Thanks for your interest in Syncfusion products.

You can achieve your requirement by using the following code snippet and  also I have attached a simple sample that demonstrates the same.

[c#]

treeViewAdv1.SelectedNode.Background = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.Pink);

[sample link]

http://www.syncfusion.com/downloads/Support/DirectTrac/97809/ChangeNodeColor-511908967.zip

Please let us know if you need any other details.

Regards,

Berkunath A


Loader.
Live Chat Icon For mobile
Up arrow icon