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

Conditionally setting treeview node text based on property where the tyreeview also has checkboxes

2 Answers 315 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Veteran
Jason asked on 15 Sep 2020, 01:39 AM

Currently I have a treeview populated from a datasource that has additional fields.  I am using a filter to show checkboxes on the child nodes only (not the top level node). One of those extra fields is called loss.  If the loss value is greater than zero I would like to change the text color of the node to red.

My current template is "# if(!item.items){# <input type='checkbox' value='true' />#}#"

How would I do this?

 

Thanks

Jason

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 16 Sep 2020, 12:14 PM

Hello Jason,

Here you will find a small Dojo example of how the requirement could be achieved.

Let me know how that works for you.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Jason
Top achievements
Rank 1
Veteran
answered on 16 Sep 2020, 12:29 PM
Thanks
Tags
TreeView
Asked by
Jason
Top achievements
Rank 1
Veteran
Answers by
Martin
Telerik team
Jason
Top achievements
Rank 1
Veteran
Share this question
or