I have SEVERAL XamDataGrids in my application, and I want them all to include the corresponding Save buttons as soon as the user changes the checkbox in them. Currently this does not happen until I leave the cell or press the enter key, etc., because the cell is still in edit mode. I know how to fix this using the message I found in the code:
private void XamDataGrid_CellChanged(object sender, Infragistics.Windows.DataPresenter.Events.CellChangedEventArgs e)
{
e.Cell.Record.SetCellValue(e.Cell.Field, e.Editor.Value, true);
}
But how can I handle this for ALL of my grid through the application without putting this in the code for each grid? I use MVVM and, if possible, prefer not to have any code. If I should, I will, but I defintitely don’t want it in the code behind in 17 different grid files. Maybe a behavior?
source
share