Inserting New Row into the Hierarchy

4 posts, 1 answers
  1. Michael
    Michael avatar
    36 posts
    Member since:
    Sep 2014

    Posted 09 Jul 2018 Link to this post

    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

  2. Answer
    Viktor Tachev
    Admin
    Viktor Tachev avatar
    2396 posts

    Posted 11 Jul 2018 Link to this post

    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.
  3. Michael
    Michael avatar
    36 posts
    Member since:
    Sep 2014

    Posted 11 Jul 2018 in reply to Viktor Tachev Link to this post

    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!

  4. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2396 posts

    Posted 13 Jul 2018 Link to this post

    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.
Back to Top