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

Infinite Loop/Hang in GridView when items completely fill grid without vertical scrollbar

3 Answers 208 Views
GridView
This is a migrated thread and some comments may be shown as answers.
rthorat
Top achievements
Rank 1
rthorat asked on 04 Feb 2010, 03:35 PM
We are using version 2009.1.526.35 of the GridView control. Because of our project timeline and for regression reasons, we are unable to upgrade to the newest version of RadGridView at this time. However, it is on our list of tasks once it becomes feasible. We are experiencing an issue where the RadGridView hangs and pegs the CPU at 50% forever in certain circumstances. We would like to know the following:

1) Is this issue fixed in the current version of the control.
2) Is there a workaround for the version of the control we have.

The issue is triggered when there are just enough items in the grid that the grid is full and the last item is even clipped slightly by the bottom of the grid. There are no vertical scrollbars yet. Our testers found the problem by opening a page with a grid that had enough items to produce a scrollbar. Then, when you maximize the screen and the result is a grid that is just full without scrollbars, the application hangs and the CPU is pegged at 50%. We isolated this to the grid by deleting one row from the database and observing the problem no longer occurs. It is the exact number of items in the grid causing the issue. Could you answer our 2 questions listed above? Thanks.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 10 Feb 2010, 06:45 AM
Hello rthorat,

This cannot be reproduced with our latest version. Can you post your grid/page XAML to see how the grid is used in your case?

Greetings,
Vlad
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Jiri
Top achievements
Rank 1
answered on 07 Oct 2013, 02:14 PM
Hi can you tell me how you solved it? I have similar problem with GridView (I am using latest telerik revision)
0
rthorat
Top achievements
Rank 1
answered on 07 Oct 2013, 02:32 PM
This was a long time ago, so I don't remember much of the details, I am no longer working at this position, and I do not have access to the source code. I believe we had narrowed the bug down to - as I said - an exact number of items that causes a scrollbar to appear. If you add one more item, it does not happen. If you take away one item, it does not happen. So, my recollection was that you would need to 1) have a specific number of items based on the current grid size, then 2) do something to cause a layout/arrange pass. Our assumption was that the code in the layout/arrange sequence had a problem with this edge case that caused an infinite loop of layout/arrange on the control. I believe we fixed it by doing a manual calculation in code that prevented the grid from ever getting the magical number of items that would cause this. I think we would add some height to the grid or something to avoid the edge case. Not really sure, but it involves manually calculating the margins of the control, size of the control, number of items in the grid, and the size of each item, etc. to figure out if the edge case was about to be encountered. Doing this manually resolved the issue but was very cumbersome.
Tags
GridView
Asked by
rthorat
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jiri
Top achievements
Rank 1
rthorat
Top achievements
Rank 1
Share this question
or