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

Font Awesome icons

I have a database bound treeview like this

@(Html.EJ().TreeView("treeMenu")
    .TreeViewFields(s => s.Datasource((IEnumerable<Form.Models.Menu>)ViewBag.dsMenu)
        .Id("Id")
        .ParentId("ParentId")
        .Text("Text")
        .HasChild("Child")
    .ClientSideEvents(evt => evt.NodeClick("onNodeClick"))
    .ExpandOn("click")
    .EnablePersistence(true))

and I want to have one new field for the icons. Is there some example how can I do this with Font Awesome icons? Or maybe ejicons?

Thanks!

3 Replies

AB Ashokkumar Balasubramanian Syncfusion Team July 12, 2017 12:57 PM UTC

Hi Bernard, 
 
We have analyzed your query. We suspect that, you want to set the icon for each node. In our TreeView component, we have provided the “spriteCssClass” property, so you can use this property to set the icon for each node. Please check the below playground sample. 
 
 
Already we have discussed this kind of details in below forum, please check it. 
 
 
Please let us know, if the provided information’s are helpful to achieve your requirement or not. 
 
Regards, 
Ashokkumar B. 



BJ Bernard Jurlina July 15, 2017 06:32 AM UTC

Thank You!

I made custom css and png for the icons and used that with spriteCssClass property, and it's working just fine.

Regards,
Bernard.



AB Ashokkumar Balasubramanian Syncfusion Team July 17, 2017 10:31 AM UTC

Hi Bernard, 
 
We are glad to hear that your issue has been fixed. 
 
Please let us know if you need any further assistance. 
 
Regards, 
Ashokkumar B. 


Loader.
Live Chat Icon For mobile
Up arrow icon