if (dr.RowState == DataRowState.Modified), it comes back false. The rowstate appears unchanged.
Hi sbb894,
I had a similar problem. I used Value changed event to call some function for setting other values in a grid which depends on my new value of the ultra option set. My problem was, that the underlying datasource was not yet updated in value changed event. What I have done now was to set "causes validation" back to "true" on uos (and still have update mode on property changed) and I now use _Validated event of the option set. Here it seems that the binding source is already updated. I assume value changed is maybe too early for updating the binding source, but I am not sure. For my issue here its working.
Maybe it also helps you,
Alex
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.
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.
-Matt
I changed the binding to OnPropertyChanged and the behavior is still the same.
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);