be sure virtualization is on

6 posts, 0 answers
  1. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 08 Sep 2010 Link to this post

    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
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 09 Sep 2010 Link to this post

    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
  3. DevCraft banner
  4. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 09 Sep 2010 Link to this post

    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?
  5. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 14 Sep 2010 Link to this post

    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
  6. Sodi We
    Sodi We avatar
    160 posts
    Member since:
    Apr 2010

    Posted 14 Sep 2010 Link to this post

    Height and Width have a value (1044/604,5)
    so I can safely conclude virtualization is on?
  7. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 14 Sep 2010 Link to this post

    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
Back to Top
DevCraft banner