all groups > dotnet windows forms databinding > july 2007 >
You're in the

dotnet windows forms databinding

group:

Radio Button and DataSourceUpdateMode


Radio Button and DataSourceUpdateMode Steve D.
7/25/2007 4:24:07 PM
dotnet windows forms databinding:
I have three radio buttons in a group on a form.

I bind these to three boolean properties of a business object.This binding
changes the behavior of the buttons.

Let's say button1 is selected. When I click one time on button2, then
button1 is unselected. I then must click a second time on button2 before is
shows as selected. Note that one click is sufficent when there is no binding
in place.

I can change the behavior by changing the DataSourceUpdateMode to
"OnValidation." However, for other reasons on the form, I need to have this
set to "OnPropertyChange."

I see this as an error. Any advice on getting around this would be
appreciated.

Thanks,
Steve




Re: Radio Button and DataSourceUpdateMode Steve D.
7/26/2007 9:49:40 AM
I implemented a hack to solve this. In the MouseDown event I set 'Checked'
to true. Pretty silly but it seems to work in preliminary testing. However,
it violates a principle I am trying to live by where there is as close to
zero code in the UI as possible. I still think this is bug.

Steve


[quoted text, click to view]

AddThis Social Bookmark Button