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

Id when Binding to Remote Data in TreeView

2 Answers 89 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Rodney
Top achievements
Rank 1
Rodney asked on 13 Sep 2013, 07:39 PM
I have an employees table that is binding to a TreeView. I then need to display the employee information when a node is double clicked on. Is there a way to pass the Id of each object that is displayed in the TreeView to a data-id attribute in the span tag that displays them?

2 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 17 Sep 2013, 12:53 PM
Hi Rodney,

You can use the template option, however the span element is rendered after the templates which means that you cannot store the ID as a span attribute. I would recommend storing the ID as a hidden input inside the span, as shown in this example.
 
Regards,
Alexander Popov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Rodney
Top achievements
Rank 1
answered on 17 Sep 2013, 04:44 PM
Thank You Alexander! That worked perfectly!
Tags
TreeView
Asked by
Rodney
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Rodney
Top achievements
Rank 1
Share this question
or