when will this exception happen? It cannot be reproduced and will happen randomly

1 Answer 54 Views
GridView
sun
Top achievements
Rank 1
Iron
sun asked on 05 Sep 2023, 08:04 AM

this exception will happen randomly in my program ,but i cann't reproduce it , and it cann't be catched by program. so i want to know when and how will this exception happen . i want to check my program and find if there is such code which will make this exception happen

参数名: index
 Source=mscorlib
StackTrace=   在 System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   在 Telerik.WinControls.UI.ColumnLayoutHelper.ProcessColumnsCollection(List`1 columns)
   在 Telerik.WinControls.UI.ColumnLayoutHelper.CalculateColumnsWidth(SizeF availableSize)
   在 Telerik.WinControls.UI.TableViewRowLayout.MeasureRow(SizeF availableSize)
   在 Telerik.WinControls.UI.RowsContainerElement.MeasureOverride(SizeF availableSize)
   在 Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
   在 Telerik.WinControls.RadElement.Measure(SizeF availableSize)
   在 Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
   在 Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayoutCallback(ILayoutManager manager) 

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 07 Sep 2023, 12:16 PM

Hello sun jingtao,

Thank you for the provided stack trace.

However, using only the provided information is not easy to determine on what occasions this exception could be raised. Upon checking the source code at this particular moment the columns collection pass to the method is empty. This is a wild guess as I am not able to reproduce it on my side. What I notice is that this method is used when you have pinned columns. Can you confirm that? If yes, you can remove the pinned columns and check if the exception is raised again.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridView
Asked by
sun
Top achievements
Rank 1
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or