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. Image for the cookie policy date
close icon

Questions about grid grouping control

I have two questions about grid grouping control:

1- I have a grid grouping control on my form and whenever I click on it's headers, the form's Deactivate event will be raised, I think this is not as other windows controls which never deactivate their parent form, this behaviour cause me lots of problems because I have some logic in my form's Deactivate event handler.

2- How can I get the exact position of a cell(of type push button) on the screen, I need this info for displaying a form at that position whenever user click that button.

thanks alot,

3 Replies

AD Administrator Syncfusion Team November 16, 2006 12:44 PM UTC

Hi Farhad,

Issue 1: Form's Deactivate event,

We were not able to reproduce the issue here. Could you please post a small sample showing this issue or tell us how to see it in the Attached sample? This will help us to analyse the issue further.

Issue 2 : Get the screen point of the cell.

You can access the GridCellRendereBase and use the GetCellBoundCore method to get rectangle with cell bounds for the specified cell in a grid. Here is a code snippet to show this.

GridCellRendererBase cr = this.gridGroupingControl1.TableControl.GetCellRenderer(row,col);
Rectangle crect = cr.GetCellBoundsCore(row,col);
Rectangle srect = new Rectangle(this.gridGroupingControl1.PointToScreen(crect.Location),crect.Size);

Console.WriteLine("CellLayout : {0} ", srect );
Console.WriteLine("TopLeftPoint of the cell : {0} ", this.gridGroupingControl1.PointToScreen(crect.Location));
Console.WriteLine("Point from Cursor {0}", Cursor.Position);

Here is a sample.
http://www.syncfusion.com/Support/user/uploads/GGCFormCellPt_f8d52c2b.zip

Thanks for your interest in our products.

Best regards,
Haneef


FA farhad November 18, 2006 07:10 AM UTC

Hello Haneef

thank you for the reply.
the solution for screen point works well, but unfortunately the first issue is still a problem,
when I run the application, which attached to your previous post, and click on the header of the grid a message box is shown and after closing it, the same messagebox is shown again.
I am using Syncfusion version 2.1.0.9 and not upgraded to newer versions yet.
any idea will help me a lot.

best regards,
farhad



AD Administrator Syncfusion Team November 24, 2006 09:35 AM UTC

Hi Farhad,

Thanks for being patience.

We have tested the application with Essentail Studio version 2.0 many time, but we haven't reproduce the issue in our system. If you give more information about this issue, we will try debugging here.

Let me know if i am missing something.

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon