narasimman g
posted
81 posts
since
Jul 21, 2008
from
|
|
Re: Treeview: Set Style in code behind on certain conditons
|
|
|
|
|
|
|
|
|
|
|
////Call the Callrecursive function
private void PrintRecursive(TreeNode treeNode) { try { // Print each node recursively. foreach (TreeNode tn in treeNode.Nodes) { if (//Condition to find your node) { //Change style
} PrintRecursive(tn); } } catch(Exception ex) { throw ex; } } // Call the procedure using the TreeView. private void CallRecursive(TreeView treeView) { TreeNodeCollection nodes = treeView.Nodes; foreach (TreeNode n in nodes) { PrintRecursive(n); } }
|
|
|
|
|
|
narasimman g
posted
81 posts
since
Jul 21, 2008
from
|
|
Re: Treeview: Set Style in code behind on certain conditons
|
|
|
|
|
|
|
|
|
|
|
After finishing all process, send the treeview to callrecursive function.hope it gives an idea
|
|
|
|
|
|