I have several Radio Button lists on my page, each lists items under different categories, so they are listed under different headings.
I only want one item to be selected across all the lists however.
Is it possible to "group" the lists so that the affectively behave as one RadioButton Lists?
I want to avoid using jQuery/Javascript if possible
Not using the standard ASP.Net radio button list control I believe. The best thing to do would be to render out your radio buttons one-by-one in their individual lists and of course, set the "name" property so they all belong to the same group.
You could also (depending on the structure of your data) just render all options in one radio button list control and then use the css nth child selectors to insert divs/line breaks/etc. But you would probably need jQuery for this unless your targeting only browsers that supports CSS3.
Related
I need a list where for some items, there should be a checkbox available and user should be able to check multiple checkboxes i.e select multiple items.
So I made use of toolkit: "LongListMultiselector".
But I cannot figure out a way to hide the checkboxes for some element? Is there actually a way while using "LongListMultiselector" or should I change the control element.
What's the semantic difference between using a <select> element containing <option> children and, using an <input type="radio"> elements within a <fieldset> parent? Both methods offer the user to select at most one option. The only differences are visual and user-experience-related: the first method shows the user a drop-down menu while the other option shows radio buttons.
Equivalently, what's the difference between <select multiple=""> with <option> children (a select-multiple drop-down) and using <input type="checkbox"> (check boxes)? Again, I don't see any difference in function; only presentation.
I'm just wondering why the HTML spec has both methods for developers to use. If the only difference is in the presentation and in the user experience, shouldn't we only be using one method?
In general terminology there is no such particular difference between Radio Button and a Select List(Dropdown) but, since the screen space used is proportional to the number of options, if the number of options are between two to seven a web designer goes for using radio buttons, for eight or more options, he/she uses a drop-down list or single-selection list.
Another thing to keep in mind while designing is: If the default option is recommended for most users in most situations, radio buttons might draw more attention to the options than necessary.
Consider using a drop-down list if you don't want to draw attention to the options, or you don't want to encourage users to make changes. A drop-down list focuses on the current selection, whereas radio buttons emphasize all options equally.
The same follows for the checkbox and multiselect dropdown.
is there any way to either set a flex 4 list component to selectable "false" or disable/hide its selectioncolor? I've tried to change it designview, but it doesn't allow me change it that way. I've also tried tweaking it via the list component or the scroller/viewport control via as3, but I really can't seem to fin a way.
If you have a list that doesn't have selection, you can quickly change it into DataGroup. Sometimes I even prefer using DataGroup instead of the List and if I need to manage a selection I add the selection state to the items in the data provider, thus each item would know whether it is selected. This solution allows me to perform filtering, sorting, reordering on the list and still keep the selected state of the items.
try to put this on
ItemRenderer property
autoDrawBackground="false"
You could use an item renderer for the List, and set the selection color in the item renderer. Here are some examples of this:
Styling both foreground and background selection color in a Flex list/datagrid
I would like to make a multiple selection listbox in HTML that can have it's values spread across multiple columns.
I do NOT want multiple columns for each option, I would like all the options to spread across the combo box, so it looks something like a grid of options, perhaps 4 high by 5 wide.
Is this at all possible?
It's not possible using a listbox control.
For this kind of thing I would use individual checkboxes instead. Use the <label for> tag to attach the checkbox to a label. You can arrange the items any way you like.
If you want to get fancy, you can use the JQueryUI Selectable control.
Well, I curious as to the nature of Radio groups and dropdown lists in HTML. I have found that radio buttons are difficult to style but I would like to style my elements for required fields. I asked a previous question regarding styling radio buttons and giving a border color like you can do with text boxes, example:
<input type="text" style="border-color:#FF0000">
<input type="radio" style="border-color:#FF0000">
applying style to a radio button to change the border color does not work.
My Question is there any reason why I shouldnt use a drop down list insead of a radio group?
Drop down lists require more work (on the part of the user) to find out what options are available … and are as twiddly to style as radio buttons anyway.
You might try setting the border colour on the fieldset containing the radio group instead. Remember to also use some other method for indicating required fields though.
A radio group will take more room on your form than a drop down list, and of course the controls look different in appearance. My rule of thumb is if there are more than three or four choices, use a drop down list.
Majority of the users (includes mostly people with no computer background and elderly people) are really very familiar with radio buttons to answer questions of the type yes/no , male/female etc. For the convenience of the users use a radio button for such questions.
With Drop down lists the available options are not visible to the user until they interact (click it). With radio buttons all of the available options are in front of the user. While both allow you to limit the selection choices to just one option, I find that users can decide which option they want quicker with radio buttons. If it is more than 5 options though, I would reconsider.
Related question on ux.stackexchange.
Use a drop-down list for when one choice is regarded as "more important" and the alternatives are okay as being hidden from the user, for example, selecting a state in the U.S. A user lives in one state, and the alternative choices don't matter. When the user comes to the form item, they know exactly what to choose without looking at the alternatives.
On the other hand, use radio buttons for when the choices are all equally important, or the user needs to see all of them before making a selection, for example, rating on a scale from 1 to 5, or choosing an answer choice on a multiple-choice problem.
Another factor to take into account is screen real-estate: you wouldn't want radio buttons for selecting one of 50 states, and you probably wouldn't want a drop-down list for selecting a sex (Male or Female). Depending on your design and philosophy, this factor may or may not trump the factors stated above.