I'm using TreeListView in windows application, I added some data to view, now I want to give color for a cell text based on some condition, please assist me to achieve this.
This is the sample code which I tried to display data.
var parent1 = new Node("PARENT1", "-", "-" );
parent1.Children.Add(new Node("CHILD_1_1", "A", "X"));
parent1.Children.Add(new Node("CHILD_1_2", "A", "Y"));
parent1.Children.Add(new Node("CHILD_1_3", "A", "Z"));
//here I need to give color for Third column value whose value is 'Y'
var parent2 = new Node("PARENT2", "-", "-" );
parent2.Children.Add(new Node("CHILD_2_1", "B", "W"));
parent2.Children.Add(new Node("CHILD_2_2", "B", "Z"));
parent2.Children.Add(new Node("CHILD_2_3", "B", "J"));
var parent3 = new Node("PARENT3", "-", "-");
parent3.Children.Add(new Node("CHILD_3_1", "C", "R"));
parent3.Children.Add(new Node("CHILD_3_2", "C", "T"));
data = new List<Node> { parent1, parent2, parent3 };
treeListView.Roots = data;
Source