This question is locked. New answers and comments are not allowed.
Hi,
Is it possible to bind a collection of RadRadioButton to a view model property? I'd like to avoid hard-coding the different options in the XAML.
I tried the following - it generates a button for each item, but the buttons are grayed out and cannot be selected:
Is there a better way?
Thanks for your help,
Richard
Is it possible to bind a collection of RadRadioButton to a view model property? I'd like to avoid hard-coding the different options in the XAML.
I tried the following - it generates a button for each item, but the buttons are grayed out and cannot be selected:
<ItemsControl ItemsSource="{Binding AllOrderTypes}" > <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <telerik:RadRadioButton GroupName="OrderType" Content="{Binding}" Click="OrderTypeButtonClick" /> </DataTemplate> </ItemsControl.ItemTemplate></ItemsControl>Is there a better way?
Thanks for your help,
Richard