Hello
I have a grid bound to a DataTable with only one column editable. This column uses as editor a Custom Control with combos inside, and a UltraControlContainerEditor instance is used in order to embed the custom control into a cell.
My problem is that the cells are not being updated after leaving the editor (clicking elsewhere). I am positive that the value inside the Custom Control has changed.
I have noticed that the Get method of the editing property of the custom control is being called twice after leaving the cell, returning always the last selected value (because is the same cell). I don't know if that is normal grid behaviour.
Is there any particular consideration to take into account when using the UltraControlContainerEditor with a grid bound to a DataTable?
Thanks a lot.
In order to update a cell, your EditingControl has to notify the UltraControlContainerEditor that something has changed. This will in turn notify the grid that something has changed and mark the row as edited.
There are two ways to do this.
1) Fire an event for whatever property you are using on your EditingControl. For example, if you are using the Value Property of your EditingControl (the default), then your control has to fire a ValueChanged event and time the value changes.
2) The other way to do this is to implement INotifyPropertyChanged on your control and fire off this notification any time the property you are using changes.
Thanks. The editing control property name is "Mapping", which is a String. The control has a MappingChanged event handler, which is raised accordingly when the child controls value changes. Provided this is all that is required in order the notify the ucce, I think that this should work. However, as said in my previous post, it doesn't.
Now, what I fail to understand is how the UltraControlContainerEditor is going to "catch" the raised MappingChanged event. How the ucce "knows" that this event should be "monitored"?
Any recommendations would be very appreciated.