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

RadGridView WPF designer error

2 Answers 308 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Denis
Top achievements
Rank 1
Denis asked on 14 Jul 2013, 08:34 AM
Just start working with RadGridView and faced this issue in Design time, in runtime everything is working fine. For example this simple scenario from documentation.

All other control work fine both in design time and runtime.
I'm using Visual studio 2012 Update 3. Telerik 2013.2.611.45.Trial

<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="MyAppNameHere.Desktop.View.UsersControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:viewModel="clr-namespace:Toto.Desktop.ViewModel"
             mc:Ignorable="d" d:DataContext="{d:DesignInstance Type=viewModel:UsersVm}"
             d:DesignHeight="300" d:DesignWidth="600">
 
    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadGridView x:Name="radGridView" />
    </Grid>
</UserControl>

Error information:

System.NullReferenceException
Object reference not set to an instance of an object.
   at Microsoft.Expression.WpfPlatform.WpfPlatformMetadata.ShouldTrimSurroundingWhiteSpace(IType typeId)
   at Microsoft.Expression.Markup.XamlParser.ParseContent(XamlParserContext parserContext, IDocumentNodeReference
...............

or sometimes this error:

System.ArgumentException
Property 'System.Object ItemsSource' is not defined for type 'Telerik.Windows.Controls.RadGridView'
   at System.Linq.Expressions.Expression.Property(Expression expression, PropertyInfo property)
   at System.Linq.Expressions.Expression.Property(Expression expression, MethodInfo propertyAccessor)
   at Telerik.Windows.Controls.GridView.Design.GridViewDataControlMetadata.AddDefaultAttributes(AttributeCallbackBuilder builder)
..........


Kind regards, Denis

2 Answers, 1 is accepted

Sort by
0
Denis
Top achievements
Rank 1
answered on 14 Jul 2013, 08:48 AM
Just found an error in library reference:

Wrong one:
Assembly telerik.windows.controls.gridview
    C:\Program Files\Telerik\RadControls for WPF Q2 2013\Binaries\WPF45\telerik.windows.controls.gridview.dll

Should change to:
Assembly Telerik.Windows.Controls.GridView
    C:\myProject path\lib\RCWPF\2013.2.611.45.Trial\Telerik.Windows.Controls.GridView.dll

Just change reference and everything works great

Kind regards, Denis
0
Brian
Top achievements
Rank 1
answered on 27 Mar 2014, 08:07 PM
Denis,

I've been beating my head against this for a few days. I was going to submit a ticket until I came across this post. Works great! Thanks a lot!

Brian
Tags
GridView
Asked by
Denis
Top achievements
Rank 1
Answers by
Denis
Top achievements
Rank 1
Brian
Top achievements
Rank 1
Share this question
or