or
foreach (GridViewRowInfo _row in employeesGrid.Rows) |
{ |
foreach (GridViewRowInfo _row2 in _row.Rows) |
{ |
if (_row2.Cells["InitialAssignee"].Value != null && (bool)_row2.Cells["InitialAssignee"].Value == true) |
{ |
curInitialAssignee = employeesGrid.Rows.IndexOf(_row2); |
} |
} |
} |
This code assumes that there is one level of grouping. The problem is that curInitialAssignee is always set to -1. I'm not sure why I can't get the row index of _row2.
Once the above is working, I have code in the ValueChanging event that will set the value of the InitialAssignee column to false for the row that corresponds to curInitialAssignee. Followed by a line that changes curInitialAssignee to the new current row.
Also, I want to ensure that this row index remains valid even if the data is sorted differently, or a grouping is added or removed at run time.
Thanks,
Eric.