Determinig which icon to use from remote data

2 posts, 0 answers
  1. Scott
    Scott avatar
    27 posts
    Member since:
    Oct 2007

    Posted 20 Jan 2014 Link to this post

    I am trying to create a directory view using the Kendo UI Web Treeview  and the coloricons-sprite.png.  I have the directory view working using Web API, but I cannot find any sample code that shows how to associate a specific icon based on the file extension.  The only samples I have found hard code the values.  Is there a sample that shows how this can be achieved?


  2. Dimo
    Dimo avatar
    8474 posts

    Posted 21 Jan 2014 Link to this post

    Hi Scott,

    You can include CSS classes in the TreeView datasource and use sprite images, as shown in the second (right-side) TreeView here:

    If this is too much of a hard-coding for you, I am afraid I cannot offer a more automated approach.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top