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

darg a cell and dropp it into another cell

4 Answers 48 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mohammad
Top achievements
Rank 1
Mohammad asked on 09 Jul 2017, 07:44 AM

Hi 

I've got a radGridView like this below

Now I wanna drag a cell and it's value, like that is significanted by red line, and drop it into a vacant cell

would you please help me .. It's very essential and emergency

 

4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 10 Jul 2017, 12:27 PM
Hello Mohammad, 

Thank you for writing.  

RadGridView handles the whole drag and drop operation by its RadGridViewDragDropService. The PreviewDragOver event allows you to control on what targets the row being dragged can be dropped on. The PreviewDragDrop event allows you to get a handle on all the aspects of the drag and drop operation, the source (drag) grid, the destination (target) control, as well as the row being dragged. 

The PreviewDropTarget event fires when you have a drop target. In the PreviewDropTargetEventArgs you have access to the DragInstance and HitTarget. It is possible to change the drop target by the PreviewDropTargetEventArgs.DropTarget property to be the cell element, not the row. This target will be used for the PreviewDragOver event.

The following help articles are quite useful on this topic:

http://docs.telerik.com/devtools/winforms/telerik-presentation-framework/raddragdropservice
http://docs.telerik.com/devtools/winforms/gridview/drag-and-drop/radgridviewdragdropservice
http://docs.telerik.com/devtools/winforms/gridview/rows/drag-and-drop

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

Regards,
Dess
Progress Telerik
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
Mohammad
Top achievements
Rank 1
answered on 11 Jul 2017, 06:38 AM

Hi

tnx my friend but I'm a little bit bewildered now !

I can't understand how it works !

would you plz help me a little bite more by details 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 11 Jul 2017, 08:49 AM
Hello Mohammad, 

Thank you for writing back. 

Following the demonstrated approach in the referred help articles, I have prepared a sample project which result is illustrated in the attached gif file.

Could you please share your feedback about the referred help articles in my previous post and what was confusing for implementing the custom drag and drop operation? Thus, we would be able to address the problems accordingly. Thank you in advance. 

I hope this information helps. 
 Regards,
Dess
Progress Telerik
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
Mohammad
Top achievements
Rank 1
answered on 16 Jul 2017, 10:39 AM

Hello dear Dess

It was great and solved my problem !

thanks a lot

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