This is a migrated thread and some comments may be shown as answers.

RadPropertyGrid with DataTemplate containing RadComboBox throws Exception

2 Answers 154 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
John DeVight
Top achievements
Rank 1
John DeVight asked on 28 Dec 2012, 04:26 PM
I have a UserControl that contains a RadPropertyGrid and one of the property definitions for the RadPropertyGrid has the EditorTemplate set to a DataTemplate that contains a RadComboBox.  When I run the application, I get the following exception:

Could not load file or assembly 'Telerik.Windows.Controls.Input, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The system cannot find the file specified.

If I add a RadComboBox to the UserControl, the RadComboBox displays just fine.

What am I missing?


Here is the XAML:

<UserControl x:Class="Company.KendoJavaScriptExtension.MyControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:local="clr-namespace:Company.KendoJavaScriptExtension"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300"
             Name="MyToolWindow" Loaded="MyToolWindow_Loaded">
    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <DataTemplate x:Key="comboboxTemplate">
                <telerik:RadComboBox />
            </DataTemplate>
        </Grid.Resources>
         
        <telerik:RadPropertyGrid x:Name="propertyGrid" Loaded="propertyGrid_Loaded" />
    </Grid>
</UserControl>

In the UserControl's Loaded event handler, I have code similar to the following:

this.propertyGrid.PropertyDefinitions[5].EditorTemplate = LayoutRoot.Resources["comboboxTemplate"] as DataTemplate;

2 Answers, 1 is accepted

Sort by
0
John DeVight
Top achievements
Rank 1
answered on 31 Dec 2012, 03:33 PM
To fix this, I had to register the Telerik assemblies in the GAC.  Is there a way to get this working without having to register the assemblies in the GAC?
0
Craig
Top achievements
Rank 1
answered on 12 Feb 2013, 10:20 AM
Hi John,
I too have had this problem and I also don't want to register the DLLs in the GAC.
I have another post (http://www.telerik.com/community/forums/wpf/property-grid/initialization-error.aspx) waiting for me to provide a sample project that reproduces the problem but I have not been able to using my code.

I've tried using your snippet to recreate the problem but I am unable to.

Would you be able to provide a sample extending this snippet that reproduces the problem?

Craig
Tags
PropertyGrid
Asked by
John DeVight
Top achievements
Rank 1
Answers by
John DeVight
Top achievements
Rank 1
Craig
Top achievements
Rank 1
Share this question
or