Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to drag-and-drop GridView cell data to a RichEditControl document

$
0
0

This example illustrates how to drag-and-drop GridView cell data to a RichEditControl document . 

Handle GridView's MouseMove and MouseDown events to obtain the grid cell under the cursor position via the GridHitInfo object and get the cell's data.
Also, use the following RichEditControl events: DragOver and DragDrop. Most of the work is performed in the DragOver event handler. Here, you should update the RichEditControl.Document.CaretPosition property value according to the current mouse position (use the approach described in the How to: Obtain the Document Position under the Mouse Cursor article). In the DragDrop event, just insert the stored text to the caret position and call the RichEditControl.Focus method to focus the RichEditControl.

See also: How to perform drag-and-drop operation in a custom manner


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>