Home - Forums-.NET - FlyTreeView (ASP.NET) - Problem with Find Method

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Problem with Find Method
Link Posted: 30-Mar-2007 21:03
In control documentation i failed to find any example how to use Find or FindAll method. May be you give me one  :)
Link Posted: 30-Mar-2007 23:21
Find() and FindAll() methods of FlyTreeView and FlyTreeNodeCollection
use the samex syntax as generic List.Find() and List.FindAll() methods.

Anyway here're two examples.

This one returns all nodes having Text equal to \"xxx\":

FlyTreeNodeCollection foundNodes = flytreeview.FindAll(delegate(FlyTreeNode match)
{
    return match.Text == \"xxx\";
});


The second example returns the first node having personName equal to John.

FlyTreeNode node = flytreeview.Find(delegate(FlyTreeNode match)
{
    return match.Attributes[\"personName\"] == \"John\";
});



Hope this is what you need.