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.
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:

Created:

Updated:

Platform:

Replies:

79955 Mar 5,2009 09:50 AM UTC Mar 6,2009 05:36 AM UTC Windows Forms 1
loading
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,
Alexey




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();
else
this.lblElement.Text = el.ToString();
}
}

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

Let me know if you have any questions.

Regards,
Jisha



CONFIRMATION

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.

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

;