Databinding and Currency Managers
I posted a question to the microsoft.public.dotnet.framework.windowsforms.databinding newsgroup asking how to EndCurrencyEdit() on all the Currency Managers:
Remember that BindingContext manages both CurrencyManagers and
PropertyManagers. These both derive from BindingManagerBase.
> I'd like to call .EndCurrentEdit() on all the available BindingManagers.
> But I am an unable to make the following piece of code work:
>
> foreach (object o in this.BindingContext)
> {
> CurrencyManager cm = (CurrencyManager)o;
> cm.EndCurrencyEdit();
> }
>
> I get an invalid cast error.
>
> Any ideas?
>
> Richard
>
>
Bing! Just thought I might share that.

0 Comments:
Post a Comment
<< Home