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
145
UltraControlContainerEditor
posted

I cannot seem to make the grids Before (or After) CellUpdate event fire when  using the UltraControlContainerEditor. I am implementing INotifyPropertyChanged on my user control and I can verify that the PropertyChanged is firing.

I have created a component that implements ISupportInitialize. On EndInit, I loop through a collection and create an unbound column on the grid, I create a new instance of the UltraControlContainerEdit and set the editing and render properties (to my user control and my user controls "Value" property). I then set the EditorComponent property of the newly created unbound column to the instance of the UltraControlContainerEditor. As I mentioned above, I have verified that my user controls PropertyChanged event is firing. 

Any ideas?

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    The way it works is that the EditingControl has to notify the grid that the value the control is using which relates to the value of the grid cell has changed.

    So... what kind of UI change are you making to your usercontrol? For example, suppose I have a UserControl that contains a TextBox control. When the user types into the TextBox, I would need to handle the TextChanged event and update the Value of my UserControl and then fire INotifyPropertyChanged at that point.

    If you turn on the RowSelectors in the grid, it will be immediately obvious to you whether this is happening or not, because the first time you type a character in the TextBox, the row selector for that row will show a pencil to indicate there are pending changes.

    If you don't see the pencil, then there are only three possibilities: 

    1) INotifyPropertyChanged.PropetyChanged on the EditingControl did not fire.

    2) INotifyPropertyChanged.PropetyChanged on the EditingControl fired with the wrong property name.

    3) You are using an older version of the UltraControlContainerEditor. The original release version did not support INotifyPropertyChanged, but instead looked for an event in the form of "(propertyname)Changed"

    The easiest thing for you to do is put a breakpoint in your INotifyPropertyChanged.PropetyChanged implementation and see if it gets call when you enter edit mode on a grid cell and change something. If it's firing, check the property name to make sure it's correct.

    If it is firing and the property name is correct, then you probably have an old version of the controls and you will need to upgrade or add the appropriate event to your usercontrol.

Children
No Data