If you select an item in RadMultiColumnComboBox and then replace the ItemsSource of the GridViewItemsSourceProvider, the selection in the autocompletebox part of the the control is not cleared. There are items that are still selected and are not presented in the ItemsSource.
To work this around, you can create a custom GridViewItemsSourceProvider and override its OnPropertyChanged method. When the ItemsSource is changed, you can reset the selection.
public class CustomGridViewItemsSourceProvider : GridViewItemsSourceProvider
{
public RadMultiColumnComboBox Owner
{
get { return (RadMultiColumnComboBox)GetValue(OwnerProperty); }
set { SetValue(OwnerProperty, value); }
}
public static readonly DependencyProperty OwnerProperty =
DependencyProperty.Register(
"Owner",
typeof(RadMultiColumnComboBox),
typeof(CustomGridViewItemsSourceProvider),
new PropertyMetadata(null));
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
{
base.OnPropertyChanged(e);
if (e.Property.Name == "ItemsSource" && this.Owner != null)
{
this.Owner.SelectionBridge.ClearOwnerSelection();
}
}
}
<telerik:RadMultiColumnComboBox.ItemsSourceProvider>
<local:CustomGridViewItemsSourceProvider Owner="{Binding ElementName=mccb}" />
</telerik:RadMultiColumnComboBox.ItemsSourceProvider>