Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ComboBox > RadComboBox does not fire commands from within

Not answered RadComboBox does not fire commands from within

Feed from this thread
  • Gautam avatar

    Posted on Jan 23, 2012 (permalink)

    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.



    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ComboBox > RadComboBox does not fire commands from within
Related resources for "RadComboBox does not fire commands from within"

WPF ComboBox Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]