Hello Telerik,
Exception is thrown after typing in the autocompletebox and selecting an item right after that.
Thanks in advance.
If set the AutoCompleteMode property in a Style Setter, and exception is thrown.
To work this around set the property directly on the control.
<telerik:RadMultiColumnComboBox AutoCompleteMode="Search" />
the display of the drop-down part of the multicolumncombobox is different from the RAD combo box. There is an extra line between the content of the combo box and the drop-down button in the office 2016 theme at least. This should not be there to be consistent with the other combo boxes.
Stefan
The following error is thrown when the dropdown of the control is opened: Cannot find governing FrameworkElement or FrameworkContentElement for target element. ... ; target element is 'GridViewItemsSourceProvider; target property is 'ItemsSource' (type 'Object')
If the combobox is placed inside a RadGridView, the error is thrown each time the dropdown is opened (after a commit action).
The Validation.ErrorTemplate attached property is not set. To workaround this, you can use the following resource.
<ControlTemplate x:Key="ValidationTooltipTemplate">
<Grid SnapsToDevicePixels="True" VerticalAlignment="Top">
<Border Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Top" Width="3" Height="3"/>
<AdornedElementPlaceholder x:Name="Holder"/>
<Border BorderBrush="{StaticResource ValidationTooltipOuterBorder}" BorderThickness="1" CornerRadius="{StaticResource ValidationTooltip_CornerRadius}"/>
<Path Data="M2,1 L6,1 6,5 Z" Fill="{StaticResource ValidationInnerTick}" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top"/>
<Path Data="M0,0 L2,0 7,5 7,7 Z" Fill="{StaticResource ValidationOuterTick}" Width="7" Height="7" HorizontalAlignment="Right" VerticalAlignment="Top"/>
<ToolTipService.ToolTip>
<ToolTip x:Name="PART_ToolTip"
DataContext="{Binding RelativeSource={RelativeSource Mode=Self}, Path=PlacementTarget.DataContext}"
Template="{StaticResource ErrorTooltipTemplate}"
Placement="Right"/>
</ToolTipService.ToolTip>
</Grid>
</ControlTemplate>
<Style TargetType="telerik:RadMultiColumnComboBox" BasedOn="{StaticResource RadMultiColumnComboBoxStyle}">
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}" />
</Style>
When placing controls in the CellTemplate/CellEditTemplate in the RadMultiColumnComboBox`s dropdown`s GridView some do not receive/accept the mouse input correctly.
In the newest version (2021.2.615) the dropdown of a RadDatePicker does not open. A RadButton works fine and a RadComboBox open and can select an item via mouse click.
In a previous version (2021.1.325) the RadComboBox also does not work, this seems to be fixed already.
I have attached a sample project demonstrating the behavio:
1) start the project
2) open the dropdown of the RadMultiColumnComboBox
3) click on the RadDatePicker`s calender icon button. => the calender view does not open
The very same DataTemplate is applied obove the RadMultiColumnComboBox to illustrate the proper behavior in contrast.
The behavior is visually demonstrated in the .gif (1.gif and 2.gif) I have attached.
The drop-down menu does not close when a context menu is opened on top of it, even if the KeepDropDownOpen="False". The control would need to move the focus in order for the drop-down to close.
To work this around, you can use the CloseDropDown() method of the MultiColumnComboBox control.
When the SelectionMode of MultiColumnComboBox is set to Single, changing the Selection invokes twice the SelectionChanged event.
What I would expect is that the event fires only once, with one item in AddedItems and one item in RemovedItems. Currently, addition and removal is done seperately, and the two invocations of the event correspond to them.
To reproduce, just use the Getting Started article about MultiColumnComboBox with the Clubs ItemSource. Subscribe to SelectionChanged event and make a change to the selection. I hope the following gif makes this clear - the first selection is valid, but the second should invoke the event only once, with 1 item added, 1 removed.
private void RadMultiColumnComboBox_Loaded(object sender, RoutedEventArgs e)
{
var mccb = (RadMultiColumnComboBox)sender;
var selection = mccb.SelectedItem;
mccb.SetCurrentValue(RadMultiColumnComboBox.SelectedItemProperty, null);
mccb.SetCurrentValue(RadMultiColumnComboBox.SelectedItemProperty, selection);
}
When biding IsVisible of column in RadMultiColumnComboBox/GridViewItemsSourceProvider using MVVM pattern, the binding won't work initially, but is works as expected if removing the ElementName and adding it back in the below example xaml using debugger.
PS1. The binding for CheckBox(in the below sample) works with issue but not for RadMultiColumnComboBox
PS2. Also attached full sample code.
<Window x:Class="TestProject.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:local="clr-namespace:TestProject"
Title="MainWindow" Height="350" Width="525">
<Grid Margin="0,0,0,20" x:Name="rootGrid">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Button Grid.Row="0" Command="{Binding ToggleCmd}">Toggle Last Name Visible</Button>
<CheckBox Grid.Row="1" IsChecked="{Binding IsLastNameVisible}">Is Last Name Visible</CheckBox>
<telerik:RadMultiColumnComboBox Grid.Row="2">
<telerik:RadMultiColumnComboBox.ItemsSourceProvider>
<telerik:GridViewItemsSourceProvider ItemsSource="{Binding AllClubs}" AutoGenerateColumns="false" >
<telerik:GridViewItemsSourceProvider.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding FirstName}" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding LastName}"
IsVisible="{Binding DataContext.IsLastNameVisible , ElementName=rootGrid}" />
</telerik:GridViewItemsSourceProvider.Columns>
</telerik:GridViewItemsSourceProvider>
</telerik:RadMultiColumnComboBox.ItemsSourceProvider>
</telerik:RadMultiColumnComboBox>
</Grid>
</Window>
private void ScrollViewer_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
if (sender is ListBox && !e.Handled)
{
e.Handled = true;
var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta);
eventArg.RoutedEvent = UIElement.MouseWheelEvent;
eventArg.Source = sender;
var parent = ((Control)sender).Parent as UIElement;
parent.RaiseEvent(eventArg);
}
}