private void UpdateDetailView(int rowHandle, bool state) { GridView dView = gridView1.GetDetailView(rowHandle, 0) as GridView; bool aCollapsed = dView == null; if (dView == null) { gridView1.ExpandMasterRow(rowHandle); dView = gridView1.GetDetailView(rowHandle, 0) as GridView; } if (dView != null) { for (int i = 0; i < dView.DataRowCount; i++) { dView.SetRowCellValue(i, dView.Columns["check"], state); } } }