Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1300
Problem with xamTextEditor regarding IEditableObject interface
posted

Hello,

We are facing an issue with xamTextEditor regarding BeginEdit and EndEdit.

We have customer entity object which is implementing both INotifyPropertyChanged and IEditableObject. We are loading the list of customers into IList object and binding the current record to controls (To give editing functionality).

When we modify property value which is bounded to xamTextEditor control,  in the corresponding property setter, we are raising "PropertyChanged" event. Some how "BeginEdit" method (which we have implemented of IEditableObject) is not firing.

I would like to know whether xamTextEditor/ ValueEditor supports this interface or not and StartEditMode, EndEditMode are based on this interface?

For your information, If we bind the collection of customers to xamDataGrid and edit with in the cell, BeginEdit, EndEdit and CancelEdit are working fine.

Please let me know whether we need to set any properties in order to make the individual editor control work with IEditableObject.

  • 54937
    Suggested Answer
    Offline posted

    No when you set a property to a Binding the control doesn't know about or have any reference to the source of that binding. So neither our editors nor the intrinsic controls (e.g. TextBox/ComboBox) will make any calls to the source's IEditableObject interface. So StartEditMode and EndEditMode are not related to this interface. Those events really correlate to when the control will be using the edit template. The grid is a different situation. It is knows about each data item (each record in the provided data source) and so it can check for and invoke the IEditableObject members.