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

parent gdbg record count

Thread ID:





92385 Jan 12,2010 05:35 AM UTC Jan 12,2010 03:00 PM UTC WinForms 2
Tags: GridControl
Keith Aubin
Asked On January 12, 2010 05:35 AM UTC


This is likely a simple question, but I am stuck at the moment.

I have two GridDataBoundGrids, each with the same dataset as its datasource.

The dataset has two tables in it, MyParentTable and MyChildTable.

There is a FK relation between these tables called FK_ParentChild.

The datamembers on the GridDataBoundGrids 1 and 2 are MyParentTable and MyParentTable.FK_ParentChild, respectively.

Therefore, row selections in GDBG1 filter the rows shown in GDBG2.

My question is, from a GDBG2 event, such as Enter, how do I retrieve the number of rows shown in GDBG1? The trick is my form is created dynamically from metadata stored in a database, so I don't know beforehand how the grids are linked.


Lingaraj S [Syncfusion]
Replied On January 12, 2010 02:25 PM UTC

Hi Keith,

Thank you for your interest in Syncfusion products.

Please refer the below forum thread, similar kind of behavior has been discussed.

Please let me know if it helps.

Lingaraj S.

Lingaraj S [Syncfusion]
Replied On January 12, 2010 03:00 PM UTC

Hi Keith,

Sorry, please ignore the previous update.

Try using using below way in GDBG2 events to achieve your requirement as shown below.

this.gridDataBoundGrid1.CurrentCellKeyDown += new KeyEventHandler(gridDataBoundGrid1_CurrentCellKeyDown);
void gridDataBoundGrid1_CurrentCellKeyDown(object sender, KeyEventArgs e)
Control grid2=sender as Control;
if (e.KeyCode == Keys.Enter)
Form f = FindFormHelper.FindForm((GridDataBoundGrid)sender);
foreach (Control con in f.Controls)
GridDataBoundGrid grid1 = con as GridDataBoundGrid;
if (grid1!=null)
if (con!=grid2)

Please let me know if you have any queries.

Lingaraj S.


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