I have a simple RadGridView
in which I want to change the color of the text for a specific row (= 3 cells). Unfortunately, this code doesn't work:
//add new row to the grid
EventLogGrid.Items.Add(new EventLogRow(eventType, occured, msg));
//change the color of the text of all cells if it's an exception
if (eventType == EventLogger.EventType.Exception)
{
var rows = this.EventLogGrid.ChildrenOfType<GridViewRow>();
rows.Last().Foreground = new SolidColorBrush(Colors.Yellow);
}
Any input would be appreciated.