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

How to get current record when there are nested tables?

Thread ID:





79955 Mar 5,2009 09:50 AM UTC Mar 6,2009 05:36 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On March 5, 2009 09:50 AM UTC

Hi All,

I got a GCC with nested tables. Does anybody know how to get the record pointed by triangle cursor in the record header?

I tried to use selections but it is possible to select records from multiple tables and I need only the one record pointed by the cursor.

Thanks you for the help,

Jisha Joy [Syncfusion]
Replied On March 6, 2009 05:36 AM UTC

Hi Alexey,

The information about the current record is retrieved by capturing the element that is shown at the current mouse position.

Here is a sample code snippet.

Point pt = this.gridGroupingControl1.TableControl.PointToClient(Control.MousePosition);

if (this.gridGroupingControl1.TableControl.ClientRectangle.Contains(pt))
Element el = this.gridGroupingControl1.TableControl.PointToNestedDisplayElement(pt);
if (el != null)
Record r = el.GetRecord();
if (r != null)
this.lblElement.Text = r.ToString();
this.lblElement.Text = el.ToString();

Please see the following sample from our sample browser.
..\My Documents\Syncfusion\EssentialStudio\\Windows\Grid.Grouping.Windows\Samples\2.0\Grouping Architecture\Access Current Element-Cell Demo\cs

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

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