Set Cell Style based on other row data

Nov 6, 2008 at 10:54 PM
Edited Nov 6, 2008 at 10:59 PM
I am fairly new to WPF, and I'm trying to migrate an existing Winforms App and I'm having trouble with the DataGrid. My Grid is dynamically bound to a DataTable. I have auto generating columns turned on. I know some of the fields will always be returned and I need to update a cell based on some of the other cell values, but there doesn't seem to be a Row cell's collection like the Winforms DataGrid. I am trying to do this using the datagrid's LoadingRow event and I can get the values, but I don't have access to the cell I'm trying to set the style to. Any ideas?

Also, I am not trying to change the cell's value - I am trying to change the style to be a different color and add an icon based on the other cells in the row.
Nov 7, 2008 at 3:05 PM
This post,, shows how to style rows and columns based on particular properties.  It may be able to help you out for your scenario.