|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
RadioButton in 2 GroupNames?When we want radio button to belong to a group name we say,
radio1.GroupName="GroupA". In this case, radio1 will be unselected if another radio button is selected in "GroupA". Is there a way (trick, or javascript) to make radio button (radio1) belong to 2 independent radio button groups instead of one? This would be an equivalent of sayting something like radio1.GroupName1 = "GroupA"; radio1.GroupName2 = "GroupB"; Hence, whenever radio button is selected in one of the two groups, radio1 is unselected. Thanks, Amelyan Amelyan,
It sounds like one alternative would be to create two separate radio button lists. You would set both of the 'AutoPostBack' properties to be true. From here, you could programmatically check to see if a value is selected in either of the radio button lists in the SelectedIndexChanged method. For instance, if something is selected in RadioList1, make sure that there are no selections in RadioList2 and vice versa. I am not quite sure why you are using the two separate lists as one, as their might be a better way. Could you provide an example of what you are attempting to do? From what you have described, it almost sounds as if you would simply want one large group. The above option is simply a suggestion and there might be several other alternatives that may accomplish what you desire. I hope this helps, Aaron Imagine that you have a matrix/grid of radio buttons with, for examle,
three rows and three columns. O O O O O O O O O When you check a radio button in this matrix, you don't want anything else selected in the same row or column. One neat way to accomplish this is if there was a way to have radio button belong to two groups, e.g. "Row2" and "Column2". I am aware of the post back alternative. However, in my case it is not a good solution. What I am looking for is a non-postBack solution. I want to accomplish similar behavior with Two groups as already exists with one. Thanks, Amelyan *** Sent via Developersdex http://www.developersdex.com ***
Custom Controls & Javascript
DataGrid with edititemtemplate What happened to Alignment property? Specifying Width and Height properties as percentages navigate through multipage hiddenfield / htmlInputHidden ? more than one webroot Problems with ListBox Control Getting the ApplicationInstance in webcontrol? Help Event Handling Question |
|||||||||||||||||||||||