Exception occurs when a column of an empty grid is resized

7 posts, 0 answers
  1. akjoshi
    akjoshi avatar
    26 posts
    Member since:
    Nov 2008

    Posted 18 Dec 2008 Link to this post

    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
  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 19 Dec 2008 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. akjoshi
    akjoshi avatar
    26 posts
    Member since:
    Nov 2008

    Posted 19 Dec 2008 Link to this post

    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.
  5. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 19 Dec 2008 Link to this post

    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.
  6. Brandon
    Brandon avatar
    16 posts
    Member since:
    Aug 2008

    Posted 20 Jan 2009 Link to this post

    is there a way to disable column resizing? doing an upgrade is an feasible at this time, i am running 2008.3.1105
  7. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 21 Jan 2009 Link to this post

    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.
  8. Brandon
    Brandon avatar
    16 posts
    Member since:
    Aug 2008

    Posted 21 Jan 2009 Link to this post

    thanks that worked.


    just to note the namespace: 

    Telerik.Windows.Controls.GridView.GridViewHeaderSplitter
Back to Top
UI for WPF is Visual Studio 2017 Ready