Dynamic RowBackground in datagrid

Jun 6, 2009 at 6:08 AM

hi,

 i am using WPF datagrid in that we can give alternate background for row but  my problem is in my datagrid i am binding data dynamically i want to set RowBackground of each row with different color from code like for example in my datagrid will look like this
—————————————————————–
Category | Name | Year | Enter Value|
————————————-
Cat1 | | | |
————————————–
| S1 |2001 | |
————————————–
| s2 |2002 | |
————————————–
Cat2 | | | |
————————————–

i want to highlight Row with only Category and Want to give different Background color for EnterValue column how can we approach this.

 

Thanks in advance

RUkmini