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>
The text of the text input box is automatically assigned if SelectedItem is set initially. This should happen when the SelectionBoxesVisibility property is set to Visible (which is the default value). For example, if you have an item called "Item A" and you assign it to the SelectedItem property at startup of the control, then the text will also become "Item A".
To work this around, you can manually clear the text on loaded of the control.
private void RadMultiColumnComboBox_Loaded(object sender, RoutedEventArgs e)
{
var mccb = (RadMultiColumnComboBox)sender;
var tb = mccb.FindChildByType<TextBox>();
tb.Text = string.Empty;
}
If you set the KeepDropDownOpen property of RadMultiColumnComboBox to False, clicking outside of the control should close the popup showing the dropdown content. This stops working after you drag a row from the GridView outside of the dropdown. For example, the drop can happen outside of the RadMultiColumnComboBox control or on its text input and drop down button area.
To resolve this, you can subscribe to the PreviewMouseLeftButtonUp event of RadMultiColumnComboBox and capture the mouse when needed.
this.mccb.AddHandler(RadMultiColumnComboBox.PreviewMouseLeftButtonUpEvent, new MouseButtonEventHandler(Mccb_MouseLeftButtonUp), true);
//---------------
private void Mccb_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
var button = Mouse.DirectlyOver as RadDropDownButton;
if (this.mccb.IsDropDownOpen && button != null && button.TemplatedParent is RadMultiColumnComboBox)
{
Dispatcher.BeginInvoke(new Action(() => { button.CaptureMouse(); }));
}
}
The value of the SelectedItem is shown twice when the theme is changed.
A temporary solution to this would be to revert to the 2022.2.511 version.
NotImplementedException is thrown if the ItemsSourceProvider property is set in a Style setter.
To work this around, implement custom GridViewItemsSourceProvider and override its CreateInstanceCore method.
public class CustomGridViewItemsSourceProvider : GridViewItemsSourceProvider
{
protected override Freezable CreateInstanceCore()
{
return new CustomGridViewItemsSourceProvider();
}
}
The event should fire when the DropDownContentManager gets initialized.
To work this around use the InitializeSelectionBridge event. The DropDownContentManager is initialized when this event fires.
Hello,
when selecting more items and dropdown positioning is down and input filed has fixed width, the dropdown covers the input field.
It should move down to the bottom edge of input field.
Hello,
Add non-editable feature to MultiColumnComboBox ( like on ComboBox ).
Thx,
Tino.