This question is locked. New answers and comments are not allowed.
Hi,
I'm seeing very degraded performance when I'm suign RowStyleSelector.
Here is my code for the selector. It is very simple. Is there anything I can do?
public
class
TimeReportGridRowStyleSelector : StyleSelector
{
public
Style LockedForEditingStyle {
get
;
set
; }
public
Style AlternateRowStyle {
get
;
set
; }
public
override
Style SelectStyle(
object
item, DependencyObject container)
{
var row = item
as
ITimeReportRowItemBase;
if
(row !=
null
&& row.Locked)
return
LockedForEditingStyle;
var items = ((GridViewRow)container).GridViewDataControl.Items;
if
(items.IndexOf(item) % 2 == 1)
return
AlternateRowStyle;
return
base
.SelectStyle(item, container);
}
}