I wish to do this using only XAML - How to add an additional RadComboBoxItem to data bound RadComboBox? - is this possible ?
I have an observable collection that is populating a combo box.
<telerik:RadComboBox Grid.Row="0" ItemsSource="{Binding ListOfNumbers}" DisplayMemberPath="Name" EmptyText="All" SelectedItem="{Binding SelectedNumber, Mode=TwoWay}"/>
As you can see, at the moment I have the EmptyText
property set to "All". This works perfectly, in the method where the value of this combobox is used, I check it, if it is == ""
, if it is, then it retrieves all data. This is what happens when I first open my view, with nothing selected.
The problem is, when I select a number, I can no longer select "All", which is quite annoying as I would like to be able to.
How can I add this choice to my comboBox and make it save a value of "" to my dependency property, SelectedNumber
?