You need to write your own OnAfterChange code which deselects any existing radio button selection after the user selects another one. Unfortunately this is the only way to do this right now without doing some custom work in the XSL itself.

Signature
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPath Dev ( http://www.InfoPathDev.com )
I tried that . But since this is a onafterchange event so the moment I
deselect the button using my code the event gets fired automatically.i.e. it
becomes recursive and hence goes into infinite loop. I also tried in other
event "Onbefore" but here the DOM is ReadOnly and so does not allow me to do
so. Any solution ?
> You need to write your own OnAfterChange code which deselects any existing radio button selection after the user selects another one. Unfortunately this is the only way to do this right now without doing some custom work in the XSL itself.
Greg Collins [InfoPath MVP] - 23 May 2006 00:43 GMT
Yes - sorry, I should have thought about that.
You need to set a flag (a global Boolean variable which is used to determine whether YOU are making the value change in code, or whether the USER made the change by clicking on it. If the value is true, you ignore the change and return from the function, if it is false, you continue with the OnAfterChange event as normal.
Just before you change the value in code, you set your flag to true, and as soon as you are done, you set it back to false.

Signature
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )
Visit InfoPath Dev ( http://www.InfoPathDev.com )