The piece of code that throws the exception:
public partial class GridViewVirtualizingPanel
{
...
private LayoutStrategyBase LayoutStrategy
{
[DebuggerStepThrough]
get
{
if (this.layoutStrategy == null)
{
switch (this.ParentGrid.GroupRenderMode)
{
case GroupRenderMode.Nested:
this.layoutStrategy = new NestedLayoutStrategy(this, this.oldScrollData);
break;
case GroupRenderMode.Flat:
this.layoutStrategy = new FlatLayoutStrategy(this, this.oldScrollData);
break;
}
}
return this.layoutStrategy;
}
}
...
It looks like in the switch line this.ParentGrid is null.
- Message: Unhandled Error in Silverlight Application [Arg_NullReferenceException]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.10411.00&File=mscorlib.dll&Key=Arg_NullReferenceException at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.get_LayoutStrategy()
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.SubscribeToGeneratorEvents()
at Telerik.Windows.Controls.GridView.GridViewBaseVirtualizingPanel.OnLoaded(Object sender, RoutedEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)