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

Inserting New Row into the Hierarchy

3 Answers 69 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 09 Jul 2018, 12:56 PM

In the Editing example, (screenshot attached) if the user clicks on Add New Record, a new blank line appears at the top of the TreeList, therefore the new entry would be at the root.  How would I go about it, if I wanted to add someone under Buffy (using the sample data)?  I understand, I could have the user add a new row, then drag and drop the new value anywhere in the hierarchy, but I have a few issues with that.  First, I don't think it's a great user experience for the user to have to do that.  Secondly, and more importantly, we have business rules that don't allow people add a value to the root level.

 

I was hoping I could click on the row for Buffy, then click add and have the new row appear under Buffy's row.  Is this possible?

 

Thanks,

Mike

3 Answers, 1 is accepted

Sort by
0
Accepted
Viktor Tachev
Telerik team
answered on 11 Jul 2018, 09:21 AM
Hello Mike,

The TreeList widget provides built-in option to add a child element. It can be easily included by adding the createchild command. Configuration in the MVC wrapper would look similar to the following:

columns.Add().Command(c => c.CreateChild());

Let me know how the feature works for you.


Regards,
Viktor Tachev
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.
0
Michael
Top achievements
Rank 1
answered on 11 Jul 2018, 12:19 PM

Viktor, that's perfect thank you!!  Was that in any of the demo's?   If it was, I missed it, if it wasn't, I urge you guys to add it!  I think it's a very important feature for this control!

 

Thanks again!

0
Viktor Tachev
Telerik team
answered on 13 Jul 2018, 08:06 AM
Hello Michael,

I am glad that the suggestion is working for you. 

Currently the option is not present in the online examples, however, we are updating the demos so the command is shown. It would be available in the demos with the next official release. 

Regards,
Viktor Tachev
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
TreeList
Asked by
Michael
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Michael
Top achievements
Rank 1
Share this question
or