Hi,
In my application I have a grid where all columns are build dynamically in the code behind.
The user can, with the aid of a combobox, select a different layout for the gridview.
When there are many columns in the grid (and the horizontal scrollbar is visible) then I get the following error when I change the
layout:
System.ArgumentOutOfRangeException was unhandled by user code
Message=Specified argument was out of the range of valid values.
Parameter name: index
Source=Telerik.Windows.Controls.GridView
ParamName=index
StackTrace:
at Telerik.Windows.Controls.GridView.MultipleCopiesCollection.get_Item(Int32 index) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\MultipleCopiesCollection.cs:line 289
at System.Windows.Data.ListCollectionView.InternalItemAt(Int32 index)
at System.Windows.Data.ListCollectionView.GetItemAt(Int32 index)
at System.Windows.Controls.ItemCollection.GetItemAt(Int32 index)
at System.Windows.Controls.ItemCollection.get_Item(Int32 index)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.VirtualizeChildren(List`1 blockList, IItemContainerGenerator generator) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 1193
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateAndMeasureChildrenForRealizedColumns(Size constraint) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 189
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 86
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
InnerException:
In the same scenerio I found an other bug: when I switch between layouts where
in one layout ShowInsertRow = true and in the other false then I get:
System.NullReferenceException was unhandled by user code
Message=Object reference not set to an instance of an object.
Source=Telerik.Windows.Controls.GridView
StackTrace:
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.SetDataGridCellPanelWidth(IList children, Double newWidth) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 1454
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.ArrangeOverride(Size arrangeSize) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 1508
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
at System.Windows.Controls.ItemsPresenter.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
InnerException:
In my application I have a grid where all columns are build dynamically in the code behind.
The user can, with the aid of a combobox, select a different layout for the gridview.
When there are many columns in the grid (and the horizontal scrollbar is visible) then I get the following error when I change the
layout:
System.ArgumentOutOfRangeException was unhandled by user code
Message=Specified argument was out of the range of valid values.
Parameter name: index
Source=Telerik.Windows.Controls.GridView
ParamName=index
StackTrace:
at Telerik.Windows.Controls.GridView.MultipleCopiesCollection.get_Item(Int32 index) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\MultipleCopiesCollection.cs:line 289
at System.Windows.Data.ListCollectionView.InternalItemAt(Int32 index)
at System.Windows.Data.ListCollectionView.GetItemAt(Int32 index)
at System.Windows.Controls.ItemCollection.GetItemAt(Int32 index)
at System.Windows.Controls.ItemCollection.get_Item(Int32 index)
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.VirtualizeChildren(List`1 blockList, IItemContainerGenerator generator) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 1193
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateAndMeasureChildrenForRealizedColumns(Size constraint) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 189
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 86
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
InnerException:
In the same scenerio I found an other bug: when I switch between layouts where
in one layout ShowInsertRow = true and in the other false then I get:
System.NullReferenceException was unhandled by user code
Message=Object reference not set to an instance of an object.
Source=Telerik.Windows.Controls.GridView
StackTrace:
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.SetDataGridCellPanelWidth(IList children, Double newWidth) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 1454
at Telerik.Windows.Controls.GridView.GridViewCellsPanel.ArrangeOverride(Size arrangeSize) in c:\Builds\WPF_Scrum\GridView_WPF_2009_Q3_SP1\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 1508
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
at System.Windows.Controls.ItemsPresenter.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
InnerException: