复选框数据绑定OnPropertyChanged

复选框数据绑定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.