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

Exception occurs when a column of an empty grid is resized

6 Answers 54 Views
GridView
This is a migrated thread and some comments may be shown as answers.
akjoshi
Top achievements
Rank 1
akjoshi asked on 19 Dec 2008, 05:50 AM
Hi,

I am getting an exception whenever I try to resize any column of an empty gridview. Is this a known issue?

Here are the exceptions details

System.ArgumentOutOfRangeException was unhandled
  Message="Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index"
  Source="mscorlib"
  ParamName="index"
  StackTrace:
       at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
       at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at Telerik.Windows.Controls.GridViewColumnCollection.get_Item(Int32 index)
       at Telerik.Windows.Controls.GridViewColumnCollection.System.Collections.Generic.IList<Telerik.Windows.Data.IFieldDescriptor>.get_Item(Int32 index)
       at Telerik.Windows.Controls.GridViewColumn.OnColumnResizedByUser(Double horizontalChange)
       at Telerik.Windows.Controls.GridViewColumn.ResizeColumnWidth(Double HorizontalChange, Boolean resizedByUI)
       at Telerik.Windows.Controls.GridView.GridViewHeaderSplitter.GridViewHeaderSplitter_DragDelta(Object sender, DragDeltaEventArgs e)
       at System.Windows.Controls.Primitives.DragDeltaEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.Controls.Primitives.Thumb.OnMouseMove(MouseEventArgs e)
       at System.Windows.UIElement.OnMouseMoveThunk(Object sender, MouseEventArgs e)
       at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at Admin.Windows.Forms.App.Main() in E:\Abhishek\Projects\Development\Source\Admin\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

Thanks,
akjoshi

6 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 19 Dec 2008, 09:28 AM
Hi Akjoshi,

Thank you  for your interest in our control.

This is not a known issue and it is fixed in the latest version 2008.3. 1217. I suggest you download it from your account and let us know how this goes.

Regards,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
akjoshi
Top achievements
Rank 1
answered on 19 Dec 2008, 09:41 AM
Hi Rosi,

Thanks for your response; but I am little confused, if it was not a known issue then how it got fixed :) (just kidding, i think its a typo).

Currently I am using version 2008.3.1105 will upgrade it and let you know the result.
0
Rosi
Telerik team
answered on 19 Dec 2008, 10:03 AM
Hello Akjoshi,

I am sorry for the mistake. The problem is a known issue.

If you have any problems or questions related with our controls do not hesitate to contact us.

Best wishes,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Brandon
Top achievements
Rank 1
answered on 20 Jan 2009, 08:10 PM
is there a way to disable column resizing? doing an upgrade is an feasible at this time, i am running 2008.3.1105
0
Vlad
Telerik team
answered on 21 Jan 2009, 12:23 PM
Hello Brandon,

You can do this with style very easily:

<Style TargetType="{x:Type telerik:GridViewHeaderSplitter}"
 <Setter Property="IsHitTestVisible"
   <Setter.Value> 
     False 
   </Setter.Value> 
  </Setter> 
</Style> 


Regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Brandon
Top achievements
Rank 1
answered on 21 Jan 2009, 04:25 PM
thanks that worked.


just to note the namespace: 

Telerik.Windows.Controls.GridView.GridViewHeaderSplitter
Tags
GridView
Asked by
akjoshi
Top achievements
Rank 1
Answers by
Rosi
Telerik team
akjoshi
Top achievements
Rank 1
Brandon
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or