Click here to Skip to main content
14,669,375 members
Rate this:
Please Sign up or sign in to vote.
See more:
hello friends i use datatable for bind datagrid in wpf in which some value are negative so i need to display negative value in red color.


WPF DataGrid, Changing cell Text foreground color based on positive or negative value.

so how can i change color of particular cell in wpf grid.

if any possible way to do this give me suggestion.

thank you.
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Hi, i think you can reach for neccessary results with help of IValueConverter which is represented in WPF, By providing necessary style for GridCell according to your value in cell.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100