Home Forums WPF controls Xceed DataGrid for WPF Change individual cell styles

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24935 |

    Hello All,

    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)

    Xceed Support
    Member
    Post count: 5658

    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.