> How do I read all the rows that have been checked? I want to create a
> report (crystal) for only the checked rows.
You'll have to loop over the rows in the DataGrid and access the Cell that
contains the checkbox. Once you have the cell, use FindControl("YourCheckBoxID")
to get the CheckBox control then get its Checked property.
// pseudocode
foreach (DataGridRow row in grid.Rows)
{
Control c = row.Cells[TheIndexOfYourCheckBoxColumn].FindControl("YourCheckBoxID");
CheckBox cb = c as CheckBox;
if (cb != null && cb.Checked)
{
// this row has been selected
}
}
-Brock
DevelopMentor
http://staff.develop.com/ballen