Home Forums WinForms controls Xceed Grid for WinForms record count in a detail grid Reply To: record count in a detail grid

User (Old forums)
Post count: 23064

You need to get to the detail grid through the master grid. Once a row in teh detail grid is selected, you can run through them by calling it as a member of the master grid’s row’s collection.

Try the following:

foreach(Xceed.Grid.DataRow row in masterGrid.SelectedeRows)
int count = int.Parse(row.ParentGrid.DataRows.Count.ToString());

Imported from legacy forums. Posted by KenG (had 3750 views)