All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
(e.Row
as GridViewRow)
If you want to perform conditional row formatting within gridView_RowLoaded use this code:
private
void
radGridView_RowLoaded(
object
sender, RowLoadedEventArgs e)
{
var row = e.Row
as
GridViewRow;
var person = e.DataElement
Person;
var style =
new
Style(
typeof
(GridViewRow));
if
(row ==
null
|| person ==
)
return
;
(person.ID < 5)
style.Setters.Add(
Setter(GridViewRow.BackgroundProperty,
SolidColorBrush(Colors.Black)));
Setter(GridViewRow.ForegroundProperty,
SolidColorBrush(Colors.Red)));
Setter(GridViewRow.FontWeightProperty,FontWeights.Bold));
}
row.Style = style;