Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > TreeView > how to find the radtreeviewitem in the radtreeview using lamda expression ?

Not answered how to find the radtreeviewitem in the radtreeview using lamda expression ?

Feed from this thread
  • sunil nair avatar

    Posted on Dec 15, 2011 (permalink)

    Hi,

    I'm using the silverlight version of Radtreeview control. 

    I'm loading the tree using this method - radtreeview.items.add(radtreeviewitem).

    I need to filter out  the radtreeviewitem in the radtreeview by it's name.

    I use the following lamda expression for the same, it only filters out the radtreeviewitem which is directly under the root node, but is not able to filter out the radtreeviewitem which is the child item of items directly under the root nodem i.e not able to search all children.

    radTreeView.Items.Cast<RadTreeViewItem>().FirstOrDefault().Items.Cast<RadTreeViewItem>().Where(q => q.Name == StrParentKey)


    Basically I am looking to achieve the same thing which can be done in windows treeview control like

    tree.Nodes.Find(StrParentKey,    -- the second parameter true will make sure it searches all children

    true);

    Could someone please help me ?

    Thanks,
    Sunil.


    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Dec 19, 2011 (permalink)

    Hi Sunil Nair,

    I prepared a sample project where I use your code and implement successful search by the RadTreeViewItem's Header and Name.

    Could you please check it out and let us know if we have missed something or just modify it so that the problem is reproducible? Thank you in advance for your cooperation.

    Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Attached files

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > TreeView > how to find the radtreeviewitem in the radtreeview using lamda expression ?
Related resources for "how to find the radtreeviewitem in the radtreeview using lamda expression ?"

Silverlight TreeView Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]