Following is the code scnippet of tree view in C#
I want to change the image of selected node. but I am not able to do that.
Will you please help me.
private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
MessageBox.Show(node.ToString()); // shows correct selected Node
MessageBox.Show(e.Node.ToString()); // shows correct selected Node
e.Node.ImageIndex = 2; // chages the image of previous node, instead I want it to be changed for selected node
//node.ImageIndex = 2;
Thanks and regards,