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
4160
Cells not updating when using the UltraControlContainerEditor with a grid bound to a DataTable
posted

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.

Parents
  • 469350
    Offline posted

    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.

Reply Children