Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / May 2006

Tip: Looking for answers? Try searching our database.

Grouping radio buttons in repeating section

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NAT - 21 May 2006 19:54 GMT
I have a repeating section. In this section there is a table of one row.Now
the first column is a radio button. Since this is a repeating section so I do
not know the no. of rows that can be at a time. I want the user to select a
row by clicking on the radio button (first column). But since the radio
buttons cannot be grouped here. I want to user to select only one radio
button at a time. Is there any way I can acheive the grouping of the radio
buttons in this scenario ?

Thanks in advance
Greg Collins [InfoPath MVP] - 22 May 2006 20:27 GMT
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 )

NAT - 22 May 2006 21:44 GMT
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 )

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.