开发者

Having .NET control databinding update dataSource fired onChange (as opposed to onUnfocus)?

开发者 https://www.devze.com 2022-12-15 01:33 出处:网络
B开发者_运维问答y default, a property bound to a NumericUpDown is updated only when the NumericUpDown loses focus.

B开发者_运维问答y default, a property bound to a NumericUpDown is updated only when the NumericUpDown loses focus.

Is there any way I can make it being updated right away with the displayed value, e.g. when the user clicks the up or down arrow?

Thanks a lot for any hints!


Select your NumericUpDown control in desgin mode. Then switch to the properties window and expand "(DataBindings)". Double click on "(Advanced)", a new window opens. You'll see a drop down "Data Source Update Mode", select "OnPropertyChanged". Done.

0

精彩评论

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

关注公众号