Click here to Skip to main content
15,795,581 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.

1 solution

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.
Share this answer

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900