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
330
UltraCurrencyEditor does not get updated "Value" from BindingSource control
posted

Hi All,

I am trying to use a BindingSource control together with an UltraCurrencyEditor control as below:

if (MyCurrencyEditor.DataBindings.Count == 0)

{

MyCurrencyEditor.DataBindings.Add ("Value", 

                                                                      bindSrcTransaction.DataSource, 

                                                                     "TransactionAmount", 

                                                                     true, 

                                                                     DataSourceUpdateMode.OnPropertyChanged);

}

if (bindSrcTransaction.DataSource != null)

{

    bindSrcTransaction.ResetBindings(true);

}

 

The bindingsource is updated everytime with cumulative amount, which can be seen during the debug process but the value in my currencyeditor gets stored the first time and does not change from next time.

Please suggest if the above code is right or not.

 

Thanks in advance.

Scott.

 

 

  • 469350
    Suggested Answer
    Offline posted

    Hi Scott,

    I'm not sure if this has anything to do with the issue, but the code you have here is a little odd. Why are you binding to the BindingSource.DataSource instead of binding to the BindingSource itself? That seems to defeat the whole purpose of using a BindingSource.

    Also, I'm pretty sure that DataSourceUpdateMode refers to when the BindingManager updates the data source from the control and not the other way around.