Hi
If I edit a cell, in the CellExitingEditMode event the e.Cell.value is the cell's original value, as expected, and the e.NewValue is the new value, as expected.
If the column is a template column with a Combobox in the EditorTemplate then in the CellExitingEditMode event the e.Cell.value is it's NEW value, not expected, and the e.NewValue is the new value, as expected. The row data has also been updated with this new value before the edited event is complete.
I have produced this in my application and reproduced this in your sample source code.
How can I get the original value of the cell in CellExitingEditMode when i have a combobox in the column template? At the moment the only way i can think of is storing the value on the CellEnteredEditMode event so i have it on the CellExitingEditMode event,
I am using the xamwebgrid 9.2.20092.2014
Thanks
Kevin
That's sorted it! Many Thanks.
Hi Kevin,
Cell.Value is essentially a reflection of your data object. So, my guess is the binding to your ComboBox does not have the UpdateSourceTrigger property set to Explicit.
That should delay the binding from updating your data until we trigger the UpdateSource manually.
Hope this helps,
-SteveZ