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

RadComboBox does not fire commands from within

0 Answers 112 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Gautam
Top achievements
Rank 1
Gautam asked on 23 Jan 2012, 10:14 PM
For the same viewmodel, RadComboBox does not fire the command, whereas the WPF Combobox fires the command. Here is the xaml for both in the same view.

For the below xaml, the action part of the command is NEVER executed in the itemviewmodel. 
<telerik:RadComboBox x:Name="myNewComboBox1"
                                 Height="30"
                                 Width="150"
                                 Margin="10,20"
                                 ItemsSource="{Binding Path=DateRanges}"
                                 SelectedItem="{Binding Path=SelectedValue, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock>
                            <Hyperlink Command="{Binding Path=HyperLinkCommand}">
                                <Run Text="{Binding Path=Text}" />
                            </Hyperlink>
                        </TextBlock>
                    </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
  </telerik:RadComboBox>

Commands fires in this case.
<ComboBox x:Name="myNewComboBox2"
                                 Height="30"
                                 Width="150"
                                 Margin="10,20"
                                 ItemsSource="{Binding Path=DateRanges}"
                                 SelectedItem="{Binding Path=SelectedValue, Mode=TwoWay}">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock>
                            <Hyperlink Command="{Binding Path=HyperLinkCommand}">
                                <Run Text="{Binding Path=Text}" />
                            </Hyperlink>
                        </TextBlock>
                    </DataTemplate>
                </ComboBox.ItemTemplate>
  </ComboBox>

Any reason why RadComboBox behaves like this and eats up the command?

Thanks.



No answers yet. Maybe you can help?

Tags
ComboBox
Asked by
Gautam
Top achievements
Rank 1
Share this question
or