Kendo treeview css binding

3 posts, 1 answers
  1. Emin Inam
    Emin Inam avatar
    6 posts
    Member since:
    Oct 2004

    Posted 09 Jan Link to this post

    Hello
    We want to create a kendo treeview with css binding.
    There is a hierarchical data source which is binded to this kendo treeview. We want to change left border style and color of innermost span according to the value existing in the data source. For example, we want to make left border red if status value is -1. This status value takes place in the data source which is binded to the kendo treeview. We want to make this operation for each row.
    We could not success css binding for a field from the data source and change left border style and color according to the value of that field.
    The final desired kendo treeview should look like attached png file. The attached png file could be helpful to explain the situation and request.
    I would appreciate your immediate attention to this matter.
  2. Answer
    Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2513 posts

    Posted 10 Jan Link to this post

    Hello Emin,

    You can use the spriteCssClass property of every item to set a class, which will be applied to a .k-sprite container. Then, instead of showing sprite images, you can use the elements to show the status color. See this Dojo snippet for a runnable demo. The same approach can be applied via the MVC wrappers.

    Regards,
    Alex Gyoshev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Emin Inam
    Emin Inam avatar
    6 posts
    Member since:
    Oct 2004

    Posted 10 Jan Link to this post

    Thank you Alex
Back to Top