This is a migrated thread and some comments may be shown as answers.

Check Radiobutton programmatically

3 Answers 135 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alena
Top achievements
Rank 1
Alena asked on 18 Nov 2011, 08:23 AM
I have GridView with Radiobutton column, but I don't know how to check/uncheck my radiobuttons programmatically. Could you help me?

 

 

 

 

<telerik:RadGridView Name="gridIVmodels" AutoGenerateColumns="False" CanUserReorderColumns="False" CanUserFreezeColumns="False" CanUserSortColumns="False" IsFilteringAllowed="False" ShowGroupPanel="False" CanUserDeleteRows="False" CanUserInsertRows="False" RowIndicatorVisibility="Collapsed" SelectionChanged="gridIVmodels_SelectionChanged">
  
<telerik:RadGridView.Columns>
  
<telerik:GridViewDataColumn Header="On/Off">
  
<telerik:GridViewDataColumn.CellTemplate>
  
<DataTemplate>
  
<RadioButton GroupName="groupIVmodels" Checked="RadioButton_Checked" />
  
</DataTemplate>
  
</telerik:GridViewDataColumn.CellTemplate>
  
</telerik:GridViewDataColumn>
  
</telerik:RadGridView.Columns>
  
</telerik:RadGridView>

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 18 Nov 2011, 08:26 AM
Hello Alena,

You can use MVVM to achieve your goal. You will need to bind IsChecked property of the button to your model. 

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Alena
Top achievements
Rank 1
answered on 18 Nov 2011, 09:14 AM
Hello Vlad,

Thanks for the quick reply.
To my shame I still have not figured out with MVVM. May be there is some other way?
0
Alena
Top achievements
Rank 1
answered on 21 Nov 2011, 08:52 AM
Vlad,
may be you have example with MVVM? Could you share it?
Tags
GridView
Asked by
Alena
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Alena
Top achievements
Rank 1
Share this question
or