Programmatically assigning a color to a row in DataGrid

Viewed 55383

I need to assign a color to the row I add at runtime to the DataTable. How can this be done?

3 Answers

IMPORTANT : be sure to always assign defaults for rows that aren't being colored by a condition - or any other style.

See my answer to C# Silverlight Datagrid - Row Color Change.

PS. I am in Silverlight and haven't confirmed this behavior in WPF

Related