Hi,
I have a UltraWebGrid with first column of checkboxes,
I can read data from selected rows (where checkbox is checked) without problems when not grouping columns, using:
foreach (UltraGridRow row in ulgraGridAllProjects.Rows) { if (!row.Cells[0].Value.Equals(0)) //checkboxes are in first column, if checkbox checked {
someString = row.Cells[4].Text;
}
all works fine, until I introduce groupingby (IsGroupByColumn), from this moment for all rows, the first cell.text = false, (row.Cells[0]=false), and other cells just do not exists - NULL).
Can you give me an idea how to read data from cells when rows are grouped?
Thank you, Marcin
Hi Marcin,
You need to dig through the child rows for this. Try the sample code below:
foreach (UltraGridRow oRow in UltraGrid1.Rows){ if (oRow.HasChildRows) { foreach (UltraGridRow row in oRow.Rows) { //if (Boolean.Parse(row.Cells[0].Value.ToString()) == true) if (!row.Cells[0].Value.Equals("0")) { someString = row.Cells[4].Value; reportingperiodownerships.Add(rpo); } } }}
Thanks,
Kala