RadDragDropService for ChildGrid in RadGridView

3 posts, 0 answers
  1. Vincent
    Vincent avatar
    5 posts
    Member since:
    Dec 2016

    Posted 02 Mar 2017 Link to this post

    Hello,

     

    I have a RadGridView built with a relationship like that

    GridViewTemplate childTemplate = CreateChildTemplate();
                m_testAlarmLibRelation = new GridViewRelation(this.gridTest.MasterTemplate, childTemplate);
                m_testAlarmLibRelation.ChildTemplate = m_alarmTemplate;
                m_testAlarmLibRelation.RelationName = "TestName";
                m_testAlarmLibRelation.ParentColumnNames.Add("Name");
                m_testAlarmLibRelation.ChildColumnNames.Add("TestName");
                gridTest.Relations.Add(m_testAlarmLibRelation);
                
                RadDragDropService svcTest = gridTest.GridViewElement.GetService<RadDragDropService>();
                svcTest.PreviewDragStart += svcTest_PreviewDragStart;
                svcTest.PreviewDragDrop += svcTest_PreviewDragDrop;
                svcTest.PreviewDragOver += svcTest_PreviewDragOver;

    I get the service on the main grid . But it doesn't work.

    How can i access to service on childGrid ?

     

    Thanks.

     

     

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4086 posts

    Posted 02 Mar 2017 Link to this post

    Hello Vincent,

    Thank you for writing.  

    Please refer to the following help article demonstrating how to achieve drag and drop functionality in RadGridView: http://docs.telerik.com/devtools/winforms/gridview/rows/drag-and-drop

    Note that the service is started on mouse down left which is handled by the GridDataRowBehavior. Depending on the row type RadGridView uses different row behaviors. Additional information is available here: http://docs.telerik.com/devtools/winforms/gridview/rows/row-behaviors

    I have attached a sample project for your reference where the drag and drop operation is started from the master and child templates.

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    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.
  3. Vincent
    Vincent avatar
    5 posts
    Member since:
    Dec 2016

    Posted 02 Mar 2017 Link to this post

    It works fine. Very good.

     

    Thank you

Back to Top