5 Answers, 1 is accepted
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
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
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?
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
so I can safely conclude virtualization is on?
Yes, the grid will be virtualizing in this case.
Best wishes,
Milan
the Telerik team