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

RadDragDropService for ChildGrid in RadGridView

2 Answers 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Vincent asked on 02 Mar 2017, 10:30 AM

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 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Mar 2017, 12:49 PM
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.
0
Vincent
Top achievements
Rank 1
answered on 02 Mar 2017, 05:11 PM

It works fine. Very good.

 

Thank you

Tags
GridView
Asked by
Vincent
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Vincent
Top achievements
Rank 1
Share this question
or