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

Get/update data from selected TreeView node

3 Answers 339 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Lutz
Top achievements
Rank 1
Lutz asked on 11 Aug 2017, 08:48 AM

Hi,

I have a treeview which gets data from an odata service (Sharepoint REST endpoint) using kendo.data.HierarchicalDataSource.

I am trying to get the following to work.

 

When I click on a TreeView node I want to display the complete corresponding node data in a ListView with the ability to edit and update the data like in the ListView demo for editing. Any suggestions?

 

 

 

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 15 Aug 2017, 06:19 AM
Hello Lutz,

In this scenario, I can suggest using the select event of the TreeView to retrieve the selected node and its text using the text or the dataItem methods:

http://docs.telerik.com/kendo-ui/api/javascript/ui/treeview#events-select

http://docs.telerik.com/kendo-ui/api/javascript/ui/treeview#methods-text

http://docs.telerik.com/kendo-ui/api/javascript/ui/treeview#methods-dataItem

I made an example demonstrating how to retrieve the node and to set it to the ListView:

https://dojo.telerik.com/ucUDe

Then the editing has to be handled programmatically as demonstrated in our demo:

http://demos.telerik.com/kendo-ui/listview/editing

I hope this is helpful.

Regards,
Stefan
Progress Telerik
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
Gunjan
Top achievements
Rank 1
answered on 08 Jun 2018, 03:08 PM
I would like to get some documentation on how to retrieve selected node's text and (true/false) if checked or not for angular.
0
Stefan
Telerik team
answered on 11 Jun 2018, 06:18 AM
Hello, Gunjan,

Please advise if this is for AngularJS or the Angular 2+ components.

If this is for AngularJS the demo is demonstrating how it can be achieved:

https://demos.telerik.com/kendo-ui/treeview/angular

If this is for Angular 2+, please submit the question in the Angular 2+ forum or in the ticket, so the corresponding team can provide more detailed information.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
TreeView
Asked by
Lutz
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Gunjan
Top achievements
Rank 1
Share this question
or