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

HierarchyChildTemplate VS Designer NullReferenceException

1 Answer 31 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 15 May 2012, 09:58 AM
I get an error in the visual studio designer every time I open a specific view that includes a HierarchyChildTemplate with a DataTemplate (see below). I'm using 2012.1.326.40 assemblys. During Runtime everything works fine and as expected but I'm unable to use the Visual Studio Designer which is very annoying.

Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Microsoft.Expression.Platform.WPF.InstanceBuilders.DocumentNodeObjectReader.get_Value()
   bei System.Xaml.XamlWriter.WriteNode(XamlReader reader)
   bei System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
   bei System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   bei System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, Boolean skipJournaledProperties, Uri baseUri)
   bei System.Windows.Markup.XamlReader.Load(XamlReader xamlReader, ParserContext parserContext)
   bei System.Windows.Markup.XamlReader.Load(XamlReader reader)
   bei Microsoft.Expression.Platform.WPF.InstanceBuilders.FrameworkTemplateInstanceBuilder.InstantiateTemplate(IDocumentRoot xamlDocument, TemplateSerializerContext context)
   bei Microsoft.Expression.DesignModel.InstanceBuilders.FrameworkTemplateInstanceBuilderBase`7.Instantiate(IInstanceBuilderContext context, ViewNode viewNode)
   bei Microsoft.Expression.DesignModel.Core.ViewNodeManager.Instantiate(ViewNode viewNode)

 <telerik:RadGridView.HierarchyChildTemplate>
                            <DataTemplate>
                                <telerik:RadGridView ItemsSource="{Binding PartsInOrders}" 
                                             x:Name="PartInOrderGrid" 
                                             ShowGroupPanel="False"
                                             ScrollMode="RealTime"
                                             CanUserInsertRows="False"
                                             CanUserDeleteRows="False"
                                             IsReadOnly="True"
                                             RowActivated="GridRowActivated"
                                             AutoGenerateColumns="False">
                                    <ia:Interaction.Behaviors>
                                        <commonBehaviours:GridToolsBehavior />
                                    </ia:Interaction.Behaviors>
                                    <telerik:RadGridView.Columns>
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ItemNumber, Mode=OneWay}" Header="{loc:Translation ItemNumber}" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ItemDescription, Mode=OneWay}" Header="{loc:Translation ItemDescription}" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding CommissionNumber, Mode=OneWay}" Header="{loc:Translation CommissionNumber}" />
                                        <telerik:GridViewDataColumn DataMemberBinding="{Binding PointToDeliver, Mode=OneWay}" Header="{loc:Translation PointToDeliver}" />
                                    </telerik:RadGridView.Columns>
                                </telerik:RadGridView>
                            </DataTemplate>
                        </telerik:RadGridView.HierarchyChildTemplate>

1 Answer, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
answered on 22 May 2012, 01:46 PM
Any ideas or suggestions from the community or the Telerik guys?
Tags
GridView
Asked by
Daniel
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 1
Share this question
or