if (dr.RowState == DataRowState.Modified), it comes back false. The rowstate appears unchanged.
My guess here is that the DataBinding that you're using is set to OnValidation, which means that the value will not be pushed to the underlying source until the control loses focus (i.e. its Validating/Validated logic is performed). What you could do is set the binding to OnPropertyChanged:
this.ultraOptionSet1.DataBindings.Add("Value", this.myDataSource, "", false, DataSourceUpdateMode.OnPropertyChanged);
-Matt
I changed the binding to OnPropertyChanged and the behavior is still the same.
It seems that the DataTable considers itself as still in edit mode, possibly because it implements IEditableObject, so you need to call EndCurrentEdit on the BindingContext before checking the status of the row, i.e.:
this.BindingContext[myDataSource].EndCurrentEdit();
Note that this is not specific to the Infragistics controls as I can reproduce the same behavior with a .NET TextBox.
Hi,
I have the same problem with a UltraDateTimeEditor. The OnRowChanging or OnRowChanged event are not called after a ValueChanged event.
I try to do an ultraDateTimeEditor1.BindingContext[myDataTable].EndCurrentEdit() on the ValueChanged event of the UltraDateTimeEditor but even if the I force the ExitEditMode of the editor, the DataTable OnRowChanging event is not called. I've checked the binding mode and it is OnPropertyChange.
On the close of the form or sometimes on the LostFocus the event is called but it is not the behavior I am looking for. I want to be able to save values on each updates and not at the finishing of all the updates.
Is there a simple way to do this?
Thanks.