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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Node icons in treeview

Thread ID:

Created:

Updated:

Platform:

Replies:

126329 Oct 7,2016 04:43 PM UTC Oct 10,2016 01:14 PM UTC JavaScript 2
loading
Tags: ejTreeView
Ahmed Lazreg
Asked On October 7, 2016 04:43 PM UTC

I would like to show a different icon for each node in the treeview. I have created a CSS style for each of the icons I'm using. I have 13 different icons, and my each of my nodes can have one of those icons as a node icon.
Is there a way to affect an icon to each node icon directly, or must I have to use row templates? 

PS. I'm **NOT** talking about Plus/Minus nodes icons, I'm talking about icons associated with each node.

Regards

Kaviyarasu Sivasenapathi [Syncfusion]
Replied On October 10, 2016 12:29 PM UTC

Hi Ahmed, 
 
 Thanks for contacting Syncfusion support. 
 
Yes, you can give icons for the nodes directly and also by using templates. As per your requirement we have created a sample with different icons for each node. 
 
We have prepared the sample for rendering tree view nodes with span tag. We have live demo sample for your requirement. Please refer the below link: 
 
 
We have prepared the sample for rendering tree view nodes with local data source itself by using “spriteCssClass”. To Know more about “spriteCssClass” please refer the following UG document link: 
 
 
Please let us know if you have any concerns. 
 
Regards, 
Kaviyarasu S  


Kaviyarasu Sivasenapathi [Syncfusion]
Replied On October 10, 2016 01:14 PM UTC

Hi Ahmed, 
 
 Sorry for the inconvenience caused. 
 
In the previous update, we have missed to specify the demo link for rendering tree view nodes with local data source by using “spriteCssClass”. Now you can find the sample at below. 
 
 
Please let us know if you require any further assistance. 
 
Regards, 
Kaviyarasu S  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;