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

Change the color of the drag & drop dotted rectangle with own mouse controller

Thread ID:





61704 May 31,2007 07:35 AM UTC Jun 1,2007 11:59 PM UTC WinForms 3
Tags: GridControl
Daniel Dusek
Asked On May 31, 2007 07:35 AM UTC

My problem : I want to change the color of the target dotted rectangle which appears when you drag the cell. I want to use my own mouse controller.

I have posted this question already, but the answer I have got was not helpfull enough.

I am looking for the following code sample :
Can you send me the sample, or a link to it?

Thank you!
Regards Dan Dusek

haneefm [Syncfusion]
Replied On May 31, 2007 10:06 PM UTC

Hi Dan,

Here is a minimal sample that show you "How to change the drag and drop dotted rectangle with own mouse controller?" . Please try the attached sample and let me know if this helps.

Best regards,

Daniel Dusek
Replied On June 1, 2007 03:08 PM UTC

Hi Haneef,
thank you sor far for your help.
I use my own mouse controller. The drag&drop cursor has to have a different color, so in the HitTest the position of the mouse cursor is tested and if it is on the position, where the grids drag&drop cursor would appear normally, my new cursor apperes.

But then I need that the drag&drop operation starts (I just changed the D&D cursor, but the D&D operation must be performed). It does not work in your example es well. If the custom leaf-cursor appears, then the cell can't be dragged. The drag&drop events are not cached by the mouse controller. How can I handle this? Can/should I call the drag&drop operation of the grid from my mouse controller?

So once more my problem : I need to change the drag&drop mouse cursor to my own (this is done already), then to perform normal drag&drop operation (does not work at all) and during dragging, I need that the color of the target rectangle is changed to more visible color (red).

Thank you, regards Dan

haneefm [Syncfusion]
Replied On June 1, 2007 11:59 PM UTC

Hi Dan,

One way you can do this by derving the GridDragSelectMouseController class and overide cursur property to change the your cursur. You would have to remove the old controller and register your derived one with code like:

IMouseController controller = this.grid.MouseControllerDispatcher.Find("DragSelect");
this.grid.MouseControllerDispatcher.Add(new MyGridDragSelectMouseController(this.grid));

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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