Page 1 of 1

Styled RadioButton Checked/Unchecked error

Posted: Tue Jul 02, 2019 7:40 pm
by fangeles
Hi JS-Support team,

I am customizing the appearance of controls, in this case the RadioButton, I have followed the instructions to use the ToggleButton style template (not mentioned for radio button but for check boxes, however it works) but when the page loaded, the checked and unchecked status is not respected.

Scenario: there's a conditional statement on c# that checks a specific checkbox.

Code: Select all

if(value == 1)
{
    RadioButton1.Checked = true;
}


But when I select another radio button from that radio butto group (contained in WrapPanel), the RadioButton is still checked. But when I clicked the Checked RadioButton first, it behaves normally.

Please see my sample video below (Uploaded to OneDrive)
https://1drv.ms/v/s!AmXRQIT1e96EmrlRwV32rrDchRE2QA?e=wkjIRx


Hoping for your feedback.

Thanks.

Re: Styled RadioButton Checked/Unchecked error

Posted: Fri Jul 12, 2019 3:34 am
by JS-Support @Userware
Hi,

Thanks for your message.

A "styles kit" will be released in the coming weeks that shows how to style each control. Could you please check again with those styles when they are available?

They will be added to the Showcase app at:
https://github.com/cshtml5/CSHTML5.Samples.Showcase

Thanks
Regards

Re: Styled RadioButton Checked/Unchecked error

Posted: Tue Nov 12, 2019 5:46 am
by MichaelHughes
Hi

I had a similar problem - I assumed it was my code (it still might be)

I found the first couple of times the radio button in a group didn't honour the settings.

Setting the first one off and on a couple of times seemed to clear the issue and the group responded as expected. (nasty but it worked for me) - I've just remembered I didn't report it.

It might be worth doing the same thing before attaching the relevant event to see if that helps - I do it by creating button collapsed change checked status a few times put it back to the state I want and then attach the events and then it seems to proceed as expected