I am looking for help with controlling radio buttons with code and we can skip the setup stuff.
Below is the starting HTML code and the text is hard coded.
<IgbRadioGroup><IgbRadio>Apple</IgbRadio><IgbRadio>Orange</IgbRadio></IgbRadioGroup>
I want to be able to do the following:set checkmarksget checkmarks
@code{
????
}
Hello Dean,
In order to get and set the checkmarks of the IgbRadio buttons, I would recommend that you “ref” the IgbRadio elements and then you can set their corresponding “Checked” properties. To “ref” the IgbRadio elements, you could do something like the following:
<IgbRadio @ref=”AppleRadioRef”>Apple</IgbRadio>
@code { public IgbRadio AppleRadioRef{get;set;} }
From there, you can get or set the checked status of the radio button by getting or setting the “Checked” property of the AppleRadioRef.
I hope this helps you. Please let me know if you have any other questions or concerns on this matter.