or
private void GridCommsItem_OnPreparingCellForEdit(object sender, GridViewPreparingCellForEditEventArgs e) { ((CommsItem)e.Row.DataContext).Status = "Store"; ((CommsItem)e.Row.DataContext).Quantity = 1; }
An unhandled exception of type 'System.NullReferenceException' occurred in Telerik.Windows.Controls.Docking.dllAdditional information: Object reference not set to an instance of an object.

Hello. I have big problem. I have application with next structure: ... -> ScrollViewer -> Canvas -> ContentControls (many) -> GridView.
When I remove one ContentControl with GridView from Canvas, GridView is still be in memory. It occurs because the gridView has SizeChangedEventHandler (see attached image).
I deleted ScrollViewer from application and now gridView delete from memory.
Full Call stack from attached image
Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewDataControl.EnsureInternalScrollControls() GridViewDataControl.csTelerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewDataControl.get_InternalScrollHost() GridViewDataControl.csTelerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewHeaderRow.MeasureOverride( Size ) GridViewHeaderRow.csPresentationFramework!System.Windows.FrameworkElement.MeasureCore( Size )PresentationCore!System.Windows.UIElement.Measure( Size )PresentationFramework!System.Windows.Controls.Grid.MeasureCell( int,bool )PresentationFramework!System.Windows.Controls.Grid.MeasureCellsGroup( int,Size,bool,bool )PresentationFramework!System.Windows.Controls.Grid.MeasureOverride( Size )PresentationFramework!System.Windows.FrameworkElement.MeasureCore( Size )PresentationCore!System.Windows.UIElement.Measure( Size )PresentationFramework!System.Windows.Controls.ScrollViewer.MeasureOverride( Size )Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewScrollViewer.MeasureOverride( Size ) GridViewScrollViewer.csPresentationFramework!System.Windows.FrameworkElement.MeasureCore( Size )PresentationCore!System.Windows.UIElement.Measure( Size )PresentationFramework!System.Windows.Controls.Grid.MeasureCell( int,bool )PresentationFramework!System.Windows.Controls.Grid.MeasureCellsGroup( int,Size,bool,bool )PresentationFramework!System.Windows.Controls.Grid.MeasureOverride( Size )PresentationFramework!System.Windows.FrameworkElement.MeasureCore( Size )PresentationCore!System.Windows.UIElement.Measure( Size )PresentationFramework!System.Windows.Controls.Border.MeasureOverride( Size )PresentationFramework!System.Windows.FrameworkElement.MeasureCore( Size )PresentationCore!System.Windows.UIElement.Measure( Size )PresentationFramework!System.Windows.Controls.Control.MeasureOverride( Size )Telerik.Windows.Controls.GridView!Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride( Size ) GridViewDataControl.csPresentationFramework!System.Windows.FrameworkElement.MeasureCore( Size )[Truncated]
Can you help me?
Thanks
<Button Style="{StaticResource AddButton}"> <telerik:RadContextMenu.ContextMenu > <telerik:RadContextMenu EventName="Click" ItemsSource="{Binding NewEntityMenuItems}" StaysOpen="False"> <telerik:RadContextMenu.ItemTemplate> <DataTemplate> <telerik:RadMenuItem Header="{Binding Text}" Command="{Binding MenuItemClickedCommand}" StaysOpenOnClick="False"></telerik:RadMenuItem> </DataTemplate> </telerik:RadContextMenu.ItemTemplate> </telerik:RadContextMenu> </telerik:RadContextMenu.ContextMenu></Button>