Change datagrid rows color depending of a value
https://www.systanddeploy.com/2018/10/change-datagrid-rows-color-depending-of.html
In this post I will show you how to change the rows color of your Datagrid depending of a text from a column, for instance if a specific column has the value "Failed" the row will be in Red.
What do I want ?
I have a datagrid that displays a list of computers deployment status.
I have three case of status:
- Success
- Running
- Failed
See below the datagrid before applying colors.
Datagrid before applying colors |
- Success ==> Green
- Running ==> Blue
- Failed ==> Red
See below the Datagrid after applying colors
Datagrid after applying colors |
See below the XAML part used after to apply colors
2 commentaires
Dead links.
Thanks for this example. It works perfectly
Enregistrer un commentaire