I figured out a simple hack. At this stage I think it will only work with a
two radiobutton group.
Here's the hack:
Create the two radiobutton group and databind them to two separate table
values. Setup the databindings checked event for each radiobutton, and
under advanced, change the event type to onpropertychanged. If you run the
project now, you will see the problem reproduced, where it actually takes
two clicks to change to a new radiobutton value. To fix this, in ONE of the
radiobutton column definitions, change the expression to 'Not
otherradiocolumn', where otherradiocolumn is the name of the table column
for the OTHER radiobutton. This will ensure that the radiobuttons always
switch and never cancel one another out.
If this solution could be expanded to three or more radiobuttons it would
remove the need for messy usercontrols, though I'm not sure it would be
possible.
Troy
"news.microsoft.com" <tr**@NO-SPAMebswift.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,
I have two databound radiobuttons which have advanced databinding
properties of onpropertychanged enabled so that I can raise the
columnchanged event whenever the radiobuttons are changed.
In the columnchanged event I am simply accepting changes into the dataset.
There is no dataadapter because it is a standalone dataset.
When one radiobutton is already checked (as opposed to neither) and I
select the non-checked radiobutton, the columnchanged event is raised
twice and erases the checked value of both radiobuttons in the
acceptchanges call. It is raised twice because it is first raised to
un-check the first radio button, and then called again to check the second
radio button... but on the second call it somehow sees that the second
radio button is not physically checked yet, so sends a false value.
This is pretty simple to reproduce and funnily enough nothing seems to be
available on the net to explain this with radiobuttons.
Troy