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

Load tree with already selected data

1 Answer 152 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Abinash
Top achievements
Rank 1
Abinash asked on 14 Feb 2019, 10:20 PM

Hi,

I am looking for a way where in I can achieve the following.

1. Load tree with nodes and some nodes selected and expanded. (Typically a edit screen where in some nodes are selected and saved to database)

2. I would like to Bind custom properties as well.

 

For achieving 1 I used .ItemDataBound event. But for 2 I can use DataSource. If I use datasource I can bind custom properties but not able to set Expanded, Selected, Checked properties.

 

Is there a way I can achieve both? or I am making some mistakes in my approach.

Ultimately I need to be able to retrieve all the selected nodes. Please guide me to links/examples/posts if you have any.

 

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 19 Feb 2019, 08:28 AM
Hello Abinash,

What I believe would be a proper fit for the describe scenario is the DropDownTree widget. It is an input (selection editor) widget, which allows multiple selection and supports binding to a remote DataSource. What is important to know about that component is that the selection and the checkboxes actually serve the same purpose - they point to the selected items in the widget. Those selected items could be easily retrieved using the value() method of the widget. Also, as the widget is an editor with an <input> element, the selected items will be sent upon form submit.

I would suggest you to test the functionality that the DropDownTree offers and see how it fits in the required scenario. Should you have any other questions, please do not hesitate to contact us.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TreeView
Asked by
Abinash
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or