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

Kendo treeview css binding

2 Answers 398 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Emin Inam
Top achievements
Rank 1
Emin Inam asked on 09 Jan 2017, 10:16 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 10 Jan 2017, 08:31 AM

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.
0
Emin Inam
Top achievements
Rank 1
answered on 10 Jan 2017, 10:16 AM
Thank you Alex
Tags
TreeView
Asked by
Emin Inam
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Emin Inam
Top achievements
Rank 1
Share this question
or