The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
LSLingaraj S Syncfusion Team 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) { MessageBox.Show(grid1.Model.ColCount.ToString()); } } } } }