Hello! I've been trying to highlight some rows in my grid that that indicates the start of a group of elements.
Problem is, when i use the RowLoaded event, it works right, changing the row i need but also changing other rows of the grid, that doesn't match the condition.
I want to change the background color in the rows where a string property is null or empty.
Is there any better way to approach it?
private void GridPer_RowLoaded(object sender, RowLoadedEventArgs e)
{
if (e.DataElement != null && string.IsNullOrEmpty(((e.DataElement as ClassifPeriods).Classificacao.CodMae)))
e.Row.Background = (SolidColorBrush)(new BrushConverter().ConvertFrom("#CC0000"));
}