复选框数据绑定OnPropertyChanged [英] Checkbox databinding OnPropertyChanged

查看:99
本文介绍了复选框数据绑定OnPropertyChanged的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个由标签页组成的Windows窗体.
这些选项卡页面具有复选框,这些复选框已绑定到数据库中的数据行.
我已将属性OnPropertyChanged用于绑定.

现在,当我运行此表单时,如果我不转到选项卡页,那么即使我以前设置为true,复选框控件也始终将"checked"属性显示为false,并且我还注意到该值已正确存储在该行.

现在,如果我单击选项卡页,则可以很好地显示选中的复选框,并将"checked"属性设置为true.

请帮忙,
关于问候
Saurabh

Hi guys ,
I have a windows form consisting of tab pages.
These tab pages have check boxes which i have bound to the DATA ROW from my DB.
i have used the property OnPropertyChanged for the binding.

Now when i run this form and if i dont go to a tab page then the check box control always shows the ''checked'' property to false even though i had previously set to true and i also noticed that the value is correctly stored in the row.

Now if i click on the tab page it works fine showing the check box selected and the ''checked'' property to true.

Please help,
With regards
Saurabh

推荐答案

在tabchange事件中也进行处理.
handle it on tabchange event also.


这篇关于复选框数据绑定OnPropertyChanged的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆