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

Problem with GGC

Hallo,

Syncfusion Version: 5.2.0.25

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,
Michael


4 Replies

HA haneefm Syncfusion Team 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;
Console.WriteLine(el);
}
}

Best regards,
Haneef



MI Michael 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
Michael



Screenshots.zip


MI Michael January 10, 2008 12:00 PM UTC

Hallo,

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
Michael



JJ Jisha Joy Syncfusion Team 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.
Thanks,
Jisha



Loader.
Live Chat Icon For mobile
Up arrow icon