Home › Forums › WPF controls › Xceed DataGrid for WPF › Change individual cell styles
I’m trying to change the style of indivual cells after binding my datagrid to a datatable. Specifically, I would like to change the background color of cells containing the value “n/a” to be red.
Is there any easy way to do this? I’ve tried just looping through the cells in the datagrid, but I couldn’t find an easy to just loop through each cell and retrieve its value.
Thanks in advance.
Imported from legacy forums. Posted by john (had 446 views)
I suggest you put a DataTrigger in a DataCell style that sets the Background property to red when the specific value is found.
Imported from legacy forums. Posted by Jenny [Xceed] (had 2685 views)