开发者

Databinding: Having data reflect changes of a control's value that was modified via code

开发者 https://www.devze.com 2023-03-06 23:23 出处:网络
I have databinding between a control and a DataView.All the databinding works, except for when I update the value of the control\'s databound field via code.This val开发者_C百科ue does not get reflect

I have databinding between a control and a DataView. All the databinding works, except for when I update the value of the control's databound field via code. This val开发者_C百科ue does not get reflected in the DataView. If I click into the control's field this then becomes reflected in the data. Any suggestions? Calling update on the binding manager causes the control to then reflect what is in the data. But I need some way of causing the data to ask for the newest values from the controls.

Let me know if I can clarify. Thanks.


binding.BindingManagerBase.EndCurrentEdit(); ?

the binding is:

Binding binding = new Binding("Text", datasourceObject, property);
control.DataBindings.Add(binding);
0

精彩评论

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