We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Binding Radio Button Group

How do I bind to Radion Button Group to  a viewmodel ?

  <syncfusion:SfRadioGroup Orientation="Horizontal"  VerticalOptions="End"
                                             Grid.Row="1" Grid.Column="1" >
                        <syncfusion:SfRadioButton x:Name="male" Text="Male"/>
                        <syncfusion:SfRadioButton x:Name="female" Text="Female"/>
    </syncfusion:SfRadioGroup>

3 Replies

PA Paul Anderson S Syncfusion Team December 3, 2018 11:39 AM UTC

Hi Albert K, 
 
Greetings from Syncfusion Support. 
 
SfRadioGroup doesn’t have ViewModel binding support. For your knowledge, we have inherited SfRadioGroup from StackLayout. We have used SfRadioGroup to identify the SfRadioButton groups and added validation to check the IsChecked property of each radio button among the group so that only one RadioButton can be set as true. 
 
Regards, 
Paul Anderson


LB Lorenz Becislao October 18, 2020 04:59 PM UTC

Hi do you have a demo on how to achieve "We have used SfRadioGroup to identify the SfRadioButton groups and added validation to check the IsChecked property of each radio button among the group so that only one RadioButton can be set as true"


YP Yuvaraj Palanisamy Syncfusion Team October 19, 2020 09:52 AM UTC

Hi Lorenz Becislao,  
  
Please find the demo link for grouping the list of SfRadioButton inside the SfRadioGroup to achieve this single selection among the list of buttons from the below link  
  
   
Please find the following link for more details.   
   
   
   
   
Please let us know if you need any concern.  
 
Regards, 
Yuvaraj 


Loader.
Live Chat Icon For mobile
Up arrow icon