RadGridView Grouping Error

2 posts, 0 answers
  1. James
    James avatar
    1 posts
    Member since:
    Oct 2016

    Posted 29 May 2019 Link to this post

    I have a RadGridView with EnableGrouping = True and AutoSize = true. When I drag a column to group by it I get an "Exception Unhandled" error in my Program.Cs file;

    System.Reflection.TargetInvocationException
      HResult=0x80131604
      Message=Exception has been thrown by the target of an invocation.
      Source=mscorlib
      StackTrace:
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
       at System.Windows.Forms.Control.WndProc(Message& m)
       at Telerik.WinControls.RadControl.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at TDT.Program.Main() in C:\Users\0123456789\Documents\Visual Studio Projects\TDT\TDT\Program.cs:line 19

    Inner Exception 1:
    InvalidOperationException: MeasureOverride returned positive infinity: Telerik.WinControls.UI.GroupPanelElement

     

    Any suggestions for a workaround?

  2. Dimitar
    Admin
    Dimitar avatar
    2917 posts

    Posted 30 May 2019 Link to this post

    Hello James,

    I was able to reproduce this exception. I have logged this issue on our Feedback Portal. You can track its progress, subscribe to status changes, and add your comment to it here. I have also updated your Telerik Points.

    To work around this, you need to set the MaxSize of the GroupPanelElement:
    radGridView1.GridViewElement.GroupPanelElement.MaxSize = new Size(200, 200);

    Should you have any other questions do not hesitate to ask
     
    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top