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

RadGridView Grouping Error

1 Answer 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
Veteran
James asked on 29 May 2019, 02:08 PM

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?

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 30 May 2019, 08:19 AM
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.
Tags
GridView
Asked by
James
Top achievements
Rank 1
Veteran
Answers by
Dimitar
Telerik team
Share this question
or