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

Problem with GGC

Thread ID:





70064 Nov 26,2007 07:04 AM UTC Jan 11,2008 10:06 AM UTC WinForms 4
Tags: GridControl
Asked On November 26, 2007 07:04 AM UTC


Syncfusion Version:

I have an hierarchical GridGroupingControl, and a Treeview in witch the records from the grid are also displayed. When a record is selected in the Treeview, the parent tables of this record become hidden, and only the selected record and his child tables are visible.
On all parent tables a record filter is applied, except on the related parent record. The row height of the related parent record, the column header and the AddNewRecord is set to zero.
This works pretty good, but then i have the problem that functions witch works correct before the records are blinded out, now returns invalid results.
For instance: TableControl.PointToNestedDisplayElement().

My Question is if there is any workaround to get the functions working again, or how I can get at least the nested display element from mouse position.

Best regards,

haneefm [Syncfusion]
Replied On November 26, 2007 11:50 PM UTC

Hi Michael,

In TableControlMouseDown event handler, you can get the GridTableCellStyleInfo at the point using the PointToTableCellStyle method. Once you have the GridTableStyleInfo object, you can easily get the display element of the GridTableStyleInfo. Below are the codes:

private void gridGroupingControl1_TableControlMouseDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlMouseEventArg e)
GridTableCellStyleInfo style = e.TableControl.PointToTableCellStyle(new Point(e.Inner.X, e.Inner.Y));
if (style != null)
Element el = style.TableCellIdentity.DisplayElement;

Best regards,

Replied On January 9, 2008 02:56 PM UTC

Hi Haneef

Sorry for the long delay. But this does not solve my problem because "TableControl.PointToTableCellStyle()" internal calls the function "TableControl.PointToNestedDisplayElement()".

Now I have attached some Screenshots. In "Screenshot1.jpg" - "Screenshot4.jpg" you can see expanding works in top level and nested groups when all records are visible. In Screenshot5.jpg you can see if all parent tables of an child table are hidden expanding does not work any more.

I handle the tableControlMouseDown event. In this event I get the record from mouse position with the function TableControl.PointToNestedDisplayElement() then i expand the record programmatically(or do some other stuff this depends if the mouse is over an expand button or over an row header).

Best Regards


Replied On January 10, 2008 12:00 PM UTC


I think I have found a solution for my problem:

TableControl.GetRow(TableControl.ViewLayout.PointToClientRow(e.Inner.Location, GridCellSizeKind.VisibleSize))

It returns the correct element whatever the parent elements are hidden or not.

Best Regards

Jisha Joy [Syncfusion]
Replied On January 11, 2008 10:06 AM UTC

Hi Michael,

Thank you for your update.

We are glad to know that the issue has been solved.

Let me know if you have any questions.


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

This page will automatically be redirected to the 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