This is a migrated thread and some comments may be shown as answers.
TreeViewTemplates
1 Answer 84 Views
This is a migrated thread and some comments may be shown as answers.
Gregor
Top achievements
Rank 1
Gregor asked on 29 May 2012, 11:42 AM
If I have the following treeview template:-

<script id="treeview-template" type="text/kendo-ui-template">
                                # var id = item.id; #
                                # var name = item.text; #                                                 
                                # var parentId = item.parentId; # 
                               
                                 #= item.parentid #
                                 # if (item.parentid == null) { #
                                     test
                                 # } #

                               
                                <span categoryId="#= id #" class="#= parentId #">#= name #</span>
                                <input type="hidden" name="#= name #" value="#= id #" />
                        </script>

Any way for me to disable the nodes where the parentId is null?

I tried doing this without success:-
  # if (item.parentid == null) { #
  <span categoryId="#= id #" class="k-denied">#= name #</span>
# } #
 
Thanks
Gregor

1 Answer, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 31 May 2012, 03:38 PM
Hi Gregor,

I am not sure if I understand your scenario correctly, because by design the Kendo UI Treeview nodes can not be disabled. Could you please provide more details or better yet send a simple example, which illustrates your case?

 

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