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

be sure virtualization is on

5 Answers 93 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Licenses
Top achievements
Rank 1
Licenses asked on 08 Sep 2010, 10:56 PM
is there a way to be sure that virtualization on the row and column level is on? 
I'm doing some performance tests on my page with a RadGridView and I want to be sure that I'm testing it right

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 09 Sep 2010, 07:25 AM
Hi,

 You can use both EnableColumnVirtualization and EnableRowVirtualization to check if these are not set to false and you can check if the grid is not measured with infinity height and/or width. 

Sincerely yours,
Vlad
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
Licenses
Top achievements
Rank 1
answered on 09 Sep 2010, 12:55 PM
i just tested this and in the GotFocus event I perform following code
private void funcList_GotFocus(object sender, RoutedEventArgs e)
{
Debug.WriteLine(String.Format("EnableRowVirtualization={0}", funcList.EnableRowVirtualization));
Debug.WriteLine(String.Format("EnableColumnVirtualization={0}", funcList.EnableColumnVirtualization));
Debug.WriteLine(String.Format("Height={0}-Width={1}", funcList.Height, funcList.Width))
}

with this as result
EnableRowVirtualization=True
EnableColumnVirtualization=True
Height=NaN -Width=NaN 

now just to make sure I interpret this result correctly: this means that virtualization is not used, because the Height and Width are NaN aka Infinity?
0
Milan
Telerik team
answered on 14 Sep 2010, 07:18 AM
Hello Sodi We,

Having NaN Height/Width does not mean that an element is measured with infinity - it simply means that this element does not have its Height/Width set explicitly. The best way to tell if the grid is measured with infinity is to do something like this:

public class TestGridView : RadGridView
{
    protected override Size MeasureOverride(Size constraint)
    {
        return base.MeasureOverride(constraint);
    }
}

Place a breakpoint in MeasureOverride and replace your regular grid with this TestGridView. When you start the application the breakpoint will be hit and you should observe the constraint argument. If the Height/Width is infinite when the grid is measure with infinite Height or infinite Width.

Hope this helps.


All the best,
Milan
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
Licenses
Top achievements
Rank 1
answered on 14 Sep 2010, 09:07 AM
Height and Width have a value (1044/604,5)
so I can safely conclude virtualization is on?
0
Milan
Telerik team
answered on 14 Sep 2010, 09:53 AM
Hi Sodi We,

Yes, the grid will be virtualizing in this case. 


Best wishes,
Milan
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
Tags
GridView
Asked by
Licenses
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Licenses
Top achievements
Rank 1
Milan
Telerik team
Share this question
or