I have following code in an extended DataGrid to check or uncheck the CheckBoxColumn:
if (this.Columns[c] is DataGridCheckBoxColumn)
{
CheckBox cb = this.GetCellCtrl<CheckBox>(this.Columns[fromCol], topRow);
for (int r = fromRow + 1; r <= toRow; r++)
{
CheckBox tt = this.GetCellCtrl<CheckBox>(this.Columns[fromCol], this.GetRow(r));
if (tt != null)
tt.IsChecked = cb.IsChecked;
}
}
The problem is that the checkboxes are checked (or unchecked), but the underlying data are not updated. If I mouse-clicking the checkbox, it works. So, what's the difference between my code and mouse-clicking? How to solve my problem?