We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to enable drag and drop operation when ExcelLikeSelectionFrame property is false

By default, in Grid Control drag and drop operation is enabled only when ExcelLikeSelectionFrame property is true. But the user can able to perform drag and drop operations even when ExcelLikeSelectionFrame is false by overriding GridExcelLikeDragDropMouseController.

For example: Create an ExcelDragDropController class inherited from GridExcelLikeDragDropMouseController interface and add the instance of this class into MouseControllerDispatcher of the grid.

In ExcelDragDropController class, HitTest method determines whether to perform drag and drop or not based on the mouse position. It returns 1 if the position is correct else returns 0.





CheckHitTest method is used to determine whether the mouse is pressed in the GridControl or not.



On MouseDown, invoke the method StartDragDrop of GridExcelLikeDragDropMouseController using Reflection to enable the drag and drop operation of the particular selected range. Please refer the code example for your reference



We have also prepared a sample for your reference,



Article ID: Published Date: Last Revised Date: Platform: Control:
6980 07/14/2016 07/18/2016 WPF GridControl
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon