This question is locked. New answers and comments are not allowed.
Hello,
I am having severe performance problems with the silverlight gridview control with a very basic example.
I simply have a POCO with 7 boolean properties. I have created a list of only 96 of these objects and bound that list to the itemssource of the gridview. The result is a gridview which takes 3-5 seconds to load, followed by unacceptable lag.
Is the gridview really not able to handle a 96 row x 7 column grid without resorting to virtualization?
The code:
Note: Due to a particular requirement, I'm unable to limit the height of the gridview to allow virtualization to kick in. I need all 96 rows to be "visible" at once. I have noticed that doing so does improve performance slightly (though still quite bad in my opinion) but again, it's not an option for me right now.
I am having severe performance problems with the silverlight gridview control with a very basic example.
I simply have a POCO with 7 boolean properties. I have created a list of only 96 of these objects and bound that list to the itemssource of the gridview. The result is a gridview which takes 3-5 seconds to load, followed by unacceptable lag.
Is the gridview really not able to handle a 96 row x 7 column grid without resorting to virtualization?
The code:
<
UserControl
x:Class
=
"RadControlsSilverlightApp1.Demo"
mc:Ignorable
=
"d"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
d:DesignHeight
=
"300"
d:DesignWidth
=
"400"
DataContext
=
"{Binding RelativeSource={RelativeSource Self}}"
>
<
ScrollViewer
x:Name
=
"LayoutRoot"
Background
=
"White"
Height
=
"600"
>
<
telerik:RadGridView
x:Name
=
"TestGrid"
ItemsSource
=
"{Binding Rows}"
IsReadOnly
=
"True"
ShowGroupPanel
=
"False"
IsFilteringAllowed
=
"False"
SelectionMode
=
"Extended"
SelectionUnit
=
"Cell"
ColumnWidth
=
"100"
Width
=
"800"
>
</
telerik:RadGridView
>
</
ScrollViewer
>
</
UserControl
>
public
partial
class
Demo : UserControl
{
private
List<RowObject> _rows;
public
List<RowObject> Rows
{
get
{
return
_rows;
}
set
{ _rows = value; }
}
public
Demo()
{
var rows =
new
List<RowObject>();
for
(
int
i = 0; i < 96; i++)
{
rows.Add(
new
RowObject());
}
Rows = rows;
InitializeComponent();
}
}
public
class
RowObject
{
public
bool
Monday {
get
;
set
; }
public
bool
Tuesday {
get
;
set
; }
public
bool
Wednesday {
get
;
set
; }
public
bool
Thursday {
get
;
set
; }
public
bool
Friday {
get
;
set
; }
public
bool
Saturday {
get
;
set
; }
public
bool
Sunday {
get
;
set
; }
}
Note: Due to a particular requirement, I'm unable to limit the height of the gridview to allow virtualization to kick in. I need all 96 rows to be "visible" at once. I have noticed that doing so does improve performance slightly (though still quite bad in my opinion) but again, it's not an option for me right now.