Insert a new item by positioning by row index, client-side

2 posts, 1 answers
  1. Paul
    Paul avatar
    34 posts
    Member since:
    Aug 2011

    Posted 26 Apr Link to this post

    I am looking to programmatically insert a new item in the TreeList client-side (javascript). I basically want to create a new item, set the new cell values,  its parent, and insert it into the tree at a predetermined position.  I found how to do this with the TreeView, but not the TreeList.
  2. Answer
    Eyup
    Admin
    Eyup avatar
    3333 posts

    Posted 01 May Link to this post

    Hello Paul,

    This can happen only on server-side. Generally, RadTreeList provides the following methods to open a new item in insert mode:
    - InsertItem
    - InsertChildItem

    If you want this record to be automatically inserted without prompting the user to press the Insert button, you need to update the database directly and Rebind() the treelist afterwards. This can happen using the fireCommand method with a custom command, which you can then handle using the ItemCommand server-side event handler:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/gridtableview-object/methods/firecommand

    I hope this will prove helpful.

    Regards,
    Eyup
    Telerik by Progress
    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.
Back to Top