I am using the below code to read records from child band. When I collapse the parent band, the below code is not returning the rows within parent band. I also have pagination in the child band. This code returns the record only from the first page of child band and not iterating the rows in remaining page.
Requirement is to iterate all child records within grid spanning across all rows and add all the child rows to data table which are selected using the checkbox.
If parent row is collapsed, then you can iterate through all child records to match the rows that would go under the given parent row:
//Iterage through parent grid. foreach (GridRecord row in this.WebHierarchicalDataGrid1.GridView.Rows) { // Here we take all child records if the parent row is selected and collapsed if (((ContainerGridRecord)row).IsEmptyParent) { var foundRows = ChildDataTable.AsEnumerable() .Where(x => x.ItemArray[1].ToString().Contains(row.DataKey[0].ToString())).CopyToDataTable().Rows; } } }