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


Thread ID:





88802 Aug 12,2009 01:54 PM UTC Sep 7,2009 06:20 AM UTC WinForms 5
Tags: GridControl
Karl-Michael Beck
Asked On August 12, 2009 01:54 PM UTC


i want to know whats under a certain location of the mouse pointer for a (windows forms) gridgroupingcontrol.

I expect to get detailed information, like
- which row
- which colummn
- columnheader?
- datacell?
- rowheader?
- GroupBy-Panel
- CellButton

Do you provide such information?


Jisha Joy [Syncfusion]
Replied On August 13, 2009 11:54 AM UTC

Hi Karl-Michael,

In the event handler like TableControlCellMouseHoverEnter, it is easy to get the GridTableCellStyleInfo at the point. Once you have the GridTableStyleInfo object, you know a lot about the cell. See the code:

private void gridGroupingControl1_TableControlCellMouseHoverEnter(object sender, GridTableControlCellMouseEventArgs e)
//Point pt = e.TableControl.PointToClient(Control.MousePosition);
Point pt = this.groupingGrid1.TableControl.PointToClient(Control.MousePosition);
GridTableCellStyleInfo style = this.groupingGrid1.PointToTableCellStyle(pt);
if(style.TableCellIdentity.Column != null)
Console.WriteLine("colName:{0} row rect:{1}", style.TableCellIdentity.Column.Name, this.groupingGrid1.ElementToRectangle(style.TableCellIdentity.DisplayElement));

Please let me know if this helps.


Karl-Michael Beck
Replied On August 14, 2009 09:03 AM UTC

Hi Jisha,

thanks a lot. I guess I'll step ahead a bit with this.

But i guess it will need some more code to obtain such information like
' etc

This is a general criticism at your components: They object models are very huge and complicated. The standard use case is only to obtain with lots of code. i think some facades would be good.

2 more Issues i have:

1. Somehow i got the grid into a mode where it shows buttons for detail records but when i press it it won't open. i need to check what calls lead to this and if it makes sense. However, in this state it happens that the Grid_TableControlCellMouseHoverEnter is entered while the mouselocation is outside the control. calling PointToTableCellStyle with this argument causes an nullreferenceexception. so had to to add a check for this case. i'm not sure if these 2 behaviours is intended. for me at the first sight it looks like a bug.

2. In respect of concurency i'd find it better to use the GridTableControlCellMouseEventArgs.Inner.MouseEventArgs. Maybe the error in 1. would not occur with this. But this object is nothing.

Thank you,

Jisha Joy [Syncfusion]
Replied On August 17, 2009 09:27 AM UTC

Hi Karl,

You could get details about different elements in the grid by accessing the TableCellIdentity.DisplayElement of GridTableCellStyleInfo's object. See the code:

void grid_TableControlCellMouseHoverEnter(object sender, GridTableControlCellMouseEventArgs e)
//Point pt = e.TableControl.PointToClient(Control.MousePosition);
Point pt = this.grid.TableControl.PointToClient(Control.MousePosition);
GridTableCellStyleInfo style = this.grid.TableControl.PointToTableCellStyle(pt);
if (style.TableCellIdentity.Column != null)
Console.WriteLine(" Display Element:{0}", style.TableCellIdentity.DisplayElement);


Issue 2& 3: I could not able to see the issue mentioned. Could you please provide a sample that shows the issue or reproduce the issue in the following browser sample:
..\My Documents\syncfusion\essentialstudio\\Windows\Grid.Grouping.Windows\Samples\2.0\Relations And Hierarchy\Related Master Details Demo\cs

Please let me know if you have any questions.


Karl-Michael Beck
Replied On August 25, 2009 10:40 AM UTC

Hi Jisha,

i didn'T forget you it's just that i'm currently busy with other issues i'll come back to you when i'm finished.

Thanks for your help,

Rajadurai C [Syncfusion]
Replied On September 7, 2009 06:20 AM UTC

Hi Karl,

Thanks for your update.



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