RadioButtonList with null as intial value, allow unselecting #196

Closed
opened 2026-01-29 17:33:13 +00:00 by claunia · 1 comment
Owner

Originally created by @Matthewsre on GitHub (Sep 15, 2021).

If a radio button is selected on accident for an optional selection, there is no way to reset back to null.

Alternatively if it is deemed that RadioButtonList is not the right fit for resetting/unselecting to null, then a CheckBoxList with single selection option could work as well.

Originally created by @Matthewsre on GitHub (Sep 15, 2021). If a radio button is selected on accident for an optional selection, there is no way to reset back to null. Alternatively if it is deemed that RadioButtonList is not the right fit for resetting/unselecting to null, then a CheckBoxList with single selection option could work as well.
Author
Owner

@enchev commented on GitHub (Sep 15, 2021):

The idea of radio buttons is to have always selected single option. You can add "null option" if you need this:
https://stackoverflow.com/questions/10876953/how-to-make-a-radio-button-unchecked-by-clicking-it/34778663#:~:text=If%20you%20want%20a%20single,checked%20property%20to%20false%2C%20e.g.

@enchev commented on GitHub (Sep 15, 2021): The idea of radio buttons is to have always selected single option. You can add "null option" if you need this: https://stackoverflow.com/questions/10876953/how-to-make-a-radio-button-unchecked-by-clicking-it/34778663#:~:text=If%20you%20want%20a%20single,checked%20property%20to%20false%2C%20e.g.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#196