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.
Unfortunately, activation email could not send to your email. Please try again.

Cursor location reflect to control

Thread ID:





49906 Sep 29,2006 06:01 AM Oct 3,2006 01:56 AM Windows Forms 5
Tags: GridControl
Ngurah Wirawan
Asked On September 29, 2006 06:01 AM


I always get the position of cursor reflect to rendered cell is always beyond the control

This code below is run when cell is activated.
my snippet code :

Control control = grid.CurrentCell.Renderer.Control;
if (control != null){
Point point = control.PointToClient(Cursor.Position);

The content of the variable point is always out of the area of the control. can u give me any suggestion to get the correct position of the cursor reflect to control.

Thanks in advance,

Administrator [Syncfusion]
Replied On September 29, 2006 07:32 AM

Hi Wirawan,

I have created the sample as per your requirement. The Attached will helps you to get the grid/ child control points from the Cursor.Position and let me know if you are looking something different.

Sample : http://www.syncfusion.com/Support/user/uploads/CursorPoint_6d5d48d8.zip


Administrator [Syncfusion]
Replied On October 1, 2006 09:21 PM

Hi Haneef,

The solution you gave didnot include form1.cs.


Ngurah Wirawan
Replied On October 2, 2006 09:03 PM

Hi Haneef,

Could u repost again the solution, because it didnot include form1.cs.


Administrator [Syncfusion]
Replied On October 3, 2006 12:07 AM

Hi Wirawan,

Sorry for the inconvenience caused.

Here is a sample.

Let me know if this helps.
Best Regards,

Ngurah Wirawan
Replied On October 3, 2006 01:56 AM

Hi Haneef,

I still get wrong cursor location reflect to control. Here I attached my code to your solution, please click the currency cell and look on the caption of the form the position of the cursor reflect to activated control.


Cursor location.zip


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.

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.