I have a template for a customized control panel for my grid (see below).
It has been working fine for over a year, until I did the latest update (2021 R2).
Now I get an error that the CotrolPanelItemCollection is not part of the RadGridView.
Getting really frustrated lately with updates causing more problems than solutions :/
Right now both Blazor and WPF are unusable
<Setter Property="ControlPanelItems">
<Setter.Value>
<telerik:ControlPanelItemCollection>
<telerik:ControlPanelItem ButtonTooltip="Export To CSV" >
<telerik:ControlPanelItem.ButtonContent>
<Button Name="exportCSVButton" Width="16" Height="16" FontSize="8">
CSV
</Button>
</telerik:ControlPanelItem.ButtonContent>
</telerik:ControlPanelItem>
<telerik:ControlPanelItem ButtonTooltip="Export To PDF" >
<telerik:ControlPanelItem.ButtonContent>
<Button Name="exportPDFButton" Width="16" Height="16" FontSize="10">
</Button>
</telerik:ControlPanelItem.ButtonContent>
</telerik:ControlPanelItem>
<telerik:ControlPanelItem ButtonTooltip="Column chooser" >
<telerik:ControlPanelItem.ContentTemplate>
<DataTemplate>
<ListBox ItemsSource="{Binding Columns}" BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding Header, Mode=OneWay}"
IsChecked="{Binding IsVisible, Mode=TwoWay}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DataTemplate>
</telerik:ControlPanelItem.ContentTemplate>
</telerik:ControlPanelItem>
</telerik:ControlPanelItemCollection>
</Setter.Value>
</Setter>
That last piece of information you found was important. So, the issue appears if you have both Telerik.Windows.Controls.GridView.dll and Telerik.Windows.Controls.Data.dll referenced in the project. Is this right?
The RadCardView control is mimicking the control panel feature of RadGridView which means that it uses very similar API. However, because the cardview is defined in a different assembly parts of the API had to be duplicated. This is the case with the ControlPanelItemCollection. Because both ControlPanelItemCollection classes are mapped to the "telerik" schema, the error appears.
To resolve this, you can use an additional namespace (in XAML) that points to the Telerik.Windows.Controls.GridView namespace. For example:
xmlns:gridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
Then you can use it like so:
<gridView:ControlPanelItemCollection>
Thank you for the feedback Heiko. We will update the documentation accordingly. As for the issue at hand, changing the API at this point it will be a breaking change that we prefer to avoid. Anyway, I agree that the naming could be a bit more specific for the CardView.