I have added the nodes programmatically to tree using dataset. I need to add a different image to each tier of nodes. How can this be done through code?
Hello jcom39201,
Thank you for posting this question in our community. I reviewed it and I have found a sample reproducing this placed in our samples browser. For more details and to review the sample follow the link:
http://samples.infragistics.com/aspnet/Samples/WebDataTree/EditingAndSelecting/LoadingNodes/Default.aspx?cn=data-tree&sid=fa366413-e157-4843-bfc7-998ad33e6b74
Here in this sample on adding a new element the respective picture is selected to be added too.
I hope this helps.
For any further questions with this matter, do not hesitate to contact me.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://www.infragistics.com/support
I actually need to be able to cycle through each node of the tree and based on the data in each node I need to be able to add a certain image/icon to the node. I am using a dataset to fill the tree in aspx.vb. I have not found a setting to change for individual nodes only to be able to assign an imageurl for the whole tree.
You can cycle thru them like in the sample I showed you. And to set the ImageUrl for each node to be the one you want.
Like this:
For Each Node As DataTreeNode In Me.WebDataTree1.Nodes
Node.ImageUrl = "some URL"
Let me know if you have further questions with this matter.
Hello jcom39201, Did you have a chance to try this? For any further questions with this matter do not hesitate to contact me. Sincerely, Georgi Sashev Developer Support Engineer Infragistics, Inc. http://www.infragistics.com/support
Did you have a chance to try this? For any further questions with this matter do not hesitate to contact me.
Yes, I did and that was what I needed. Thank You!