Completely and utterly broken!!!

What is going on with radio buttons and how did you manage to all of a sudden make them completely unusable???

Your own sample is broken!

https://blazor.syncfusion.com/documentation/radio-button/how-to/radiobuttonfor/

None of it works.  First there's an error:
The type of component 'SfRadioButton' cannot be inferred...

Even adding a TChecked='bool', when you run the sample and click on a button you get
Unhandled exception rendering component: String was not recognized as a valid Boolean.

I have broken code all over the place after upgrading to 18.2.x!!!

Why screw with something as basic as radio buttons that were working perfectly fine?  



1 Reply 1 reply marked as answer

MK Mohan Kumar Ramasamy Syncfusion Team July 23, 2020 10:04 AM UTC

Hi Edward, 
 
Sorry for the inconvenience caused. 
 
We have provided the generic type support for Checked property. And also we have changed event arguments as strongly type for ChangeEventArgs. Could you please find the below code snippet. 

@using Syncfusion.Blazor.Buttons 
@using System.ComponentModel.DataAnnotations 
 
< <EditForm Model="Annotate"> 
    <DataAnnotationsValidator></DataAnnotationsValidator> 
    <div class="form-group"> 
        <SfRadioButton Label="Male" Name="Gender" Value="male" @bind-Checked="@Annotate.Gender" ValueChange="@StateChange" TChecked="string"></SfRadioButton> 
        <SfRadioButton Label="Female" Name="Gender" Value="female" @bind-Checked="@Annotate.Gender"></SfRadioButton> 
        <ValidationMessage For="@(() => Annotate.Gender)" /> 
    </div> 
    <SfButton Content="Submit" IsPrimary="true"></SfButton> 
</EditForm> 
 
@code { 
 
    public Annotation Annotate = new Annotation(); 
 
    private void StateChange(ChangeArgs<string> args) 
    { 
 
    } 
 
    public class Annotation 
    { 
        [Required] 
        public string Gender { get; set; } 
    } 
} 
 

For your reference, we have prepared a sample please refer the below link. 


Please note that we have introduced several API break in this release. We would like you to review the breaking changes from the below location before you upgrade.

https://blazor.syncfusion.com/documentation/release-notes/18.2.44/?type=breaking-changes 
 
We need to refresh this documentation link. Once we refreshed the documentation, we will inform you. 
 
Please let us know if you need any further assistance, 
 
Regards, 
Mohankumar R 


Marked as answer
Loader.
Up arrow icon