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

GridViewCell GotFocus LostFocus memory issue

6 Answers 131 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mike McDougall
Top achievements
Rank 1
Mike McDougall asked on 09 Oct 2009, 06:25 PM
I am loading up a grid with 60 rows and about 40 columns.  I am not doing anything special except binding to some csla objects.  I have set the grid to readonly and Autogenerate columns.  I have two issues.

1.  The vertical scroll is really slow.

2. There seems to be a memory leak.  When I put the control in the content pane of another control and then remove it and add it back as you might do with a tabbed interface the memory continuasly spins up.  I have replaced the control with the plain silverlight grid with the same scenario and there are no memory issues.   When run in Silverlight spy I can see in the Event Monitor that GridViewCell lostFocus and GotFocus get called almost 1000 times within 3 seconds!  Keep in mind I have registered for no events on this grid.  This seems to happen when I close and remove the containing control? Once the 1000 events get called the memory spins up wildly and performance and navigation go very slow.

Can you run your grid in Silverlight spy and monitor the events please.

Thanks,
Mike


6 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 15 Oct 2009, 02:23 PM
Hi Mike McDougall,

Sorry for the late response. We are quite busy with our Beta 2 release.
I'm happy to inform you that we have included major virtualization improvements with the beta and hopefully they will address the performance issues.
As for the memory leaks we keep high hopes that all known memory leaks that we are aware of are fixed.

Please download the beta and let us know how you find the grid performance. If you still experience this memory leak  please send us a sample project to test it locally.

Kind regards,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
sun
Top achievements
Rank 1
answered on 16 Oct 2009, 09:42 AM
Hi Mike McDougall
   Is ok for the Problem?  I do not know how to faster as GridViewCell GotFocus or LostFocus !
Thanks
0
Craig Somers
Top achievements
Rank 1
answered on 25 Feb 2010, 11:52 PM
Hi,
Just wondering if there are any updates to this issue. We are facing a similar issue when we switch from a tab containg a grid to another tab. If the grid has 100 cells visible, a gotfocus and lostfocus event is fired for each of those cells and it takes almost a second to just leave that tab. We have verified this using Silverlight Spy. We are also running the latest version : 2009.3.1314.1030
0
Craig Somers
Top achievements
Rank 1
answered on 25 Feb 2010, 11:59 PM
Is there a way to suppress the GridViewCell GotFocus and LostFocus events from firing?
0
Stefan Dobrev
Telerik team
answered on 26 Feb 2010, 02:47 PM
Hello Craig,

By default GridViewCell is a tab stop element and this is the reason why you are experiencing this issue. There are a number of ways for you to workaround this. You can create a cell style which sets IsTabStop property to false, but you will lose some of the keyboard navigation features of the grid. Better way to solve this is to focus some element outside of the grid before changing the current tab. If you are using RadTabControl PreviewSelectionChanged event comes in handy:

XAML:
<telerikNavigation:RadTabControl x:Name="TabControl1" PreviewSelectionChanged="RadTabControl_PreviewSelectionChanged" ...>
C#:
private void RadTabControl_PreviewSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
{
AnyFocusableElement.Focus();
}

Hope this helps,
Stefan Dobrev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Craig Somers
Top achievements
Rank 1
answered on 26 Feb 2010, 05:52 PM
Thanks! That worked.
Tags
GridView
Asked by
Mike McDougall
Top achievements
Rank 1
Answers by
Hristo
Telerik team
sun
Top achievements
Rank 1
Craig Somers
Top achievements
Rank 1
Stefan Dobrev
Telerik team
Share this question
or