开发者

BindingSource, set datasource and then set a NEW datasource

开发者 https://www.devze.com 2023-01-15 16:59 出处:网络
I\'ve got a BindingSource with only 1 o开发者_C百科bject as the DataSource. I bind on some values on the datasource. That works perfectly.

I've got a BindingSource with only 1 o开发者_C百科bject as the DataSource.

I bind on some values on the datasource. That works perfectly.

BUT.

When I do:

bindingSource.DataSource = new Foo () { Bar = "..."; } 

this is not reflected through the UI.

is there a way to force an update?

I tried resetbindings on the controls that bind to the datasource but no luck.


Have you tried calling ResetBindings() on the BindingSource instead?

0

精彩评论

暂无评论...
验证码 换一张
取 消