Add parent to selectedItem & drap n drop

3 posts, 0 answers
    HWI CHEOL avatar
    8 posts
    Member since:
    Mar 2018

    Posted 01 Apr 2018 Link to this post


    I  have two question.

    I need your help.

    1. Add parent to selectedItem

    privite void Buttom1_click(object sender, EventArge e)


        // Add parent to selectedItem

       // raising error

       GanttViewDataItem item = new GanttViewDataItem();




    2. GanttViewTextItemEelement Drap & drop is possible to change parent & child?


  2. Hristo
    Hristo avatar
    1522 posts

    Posted 03 Apr 2018 Link to this post


    RadGanttView supports drag and drop of the task elements in graphical. The drag and drop service is responsible for resizing and moving of the task elements. At the moment reordering of the tasks in the text view is not supported. We have a feature request logged on our feedback portal, here: ADD. RadGanttView - add .ability to drag and drop tasks in the text part, so the items can be rearranged vertically as well. You can subscribe to the item and be updated when its status changes. In the meantime, you can use the standard OLE drag-drop to create your own drag-drop functionality. You should manipulate the items straight in your data source if you use RadGanttView in bound mode. Additional information is available in the following MSDN thread:

    If you want to add a parent of the currently selected item you will need to add a new task to your RadGanttView. If you are in an unbound mode you can create the new item, remove it from its paren`s Items collection and then add it to the new task which will be its new parent. Then the new parent can be added to the Gantt control, in the code snippet below the new parent is added as a child of the old parent: 
    GanttViewDataItem selectedItem = this.radGanttView1.SelectedItem;
    if (selectedItem != null)
        GanttViewDataItem oldParent = selectedItem.Parent;
        GanttViewDataItem newParent = new GanttViewDataItem() { Title = "New Parent" };

    If you want to create a new root item you can add it straight to the Items collection of the control. In bound mode, you will need to change the data source object to reflect the new relations between the items and then rebind the control.

    I hope this helps. Let me know if you have other questions.

    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.
    HWI CHEOL avatar
    8 posts
    Member since:
    Mar 2018

    Posted 10 Apr 2018 in reply to Hristo Link to this post

    A ha~ Thanks to your answer
Back to Top