This is a migrated thread and some comments may be shown as answers.

Determinig which icon to use from remote data

1 Answer 65 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 20 Jan 2014, 03:28 PM
Hello,
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?
Thanks,

Scott



1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 21 Jan 2014, 09:43 AM
Hi Scott,

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

http://demos.kendoui.com/web/treeview/images.html

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

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Scott
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or