I have treeView1
, I need to create treeview2
using nodes of treeView1 when treeNode.Text == myString
. So I have to traverse all nodes of treeView1, and if treeNode.Text == myString
,
then I should add this node to treeView2
, and if any of this node's childs has this property (treeNode.Text == myString
), then I should also add this node to treeView2
,
even if .Text != myString
. In other words, treeView2
object is a filtered treeView1 object.
Could someone give me an idea how to implement this ?