Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

How to select particular Node and its child nodes in TreeView of ASP.Net 2005 ?


I have filled a treeview with parents and childs, using Hashtables.

Now, how can I check the required Parent and its Child Nodes.

for example, I have following data

Group
    Item A
        Item A1
        Item A2
    Item B
        Item B1
        Item B2

Now, I want to check the Item B, Item B1 and Item B2 Only, how can I  ?

I have also saved the Keyvalues in the nodes, but still I don't know, how to
go to Item B ?
I know, that Item B has a Keyvalue B.

Any Idea please ?

Best Regards,

Luqman

Is that what you're looking for?

foreach (TreeNode tn in tree.Nodes) {
    if (tn.Text == "Item B") {
        // you found it and can go for B1-Bn
    }

}
"Luqman" <pearls@cyber.net.pk> wrote in message

news:%23D8Osb6pHHA.4132@TK2MSFTNGP02.phx.gbl...

Hi,

for each loop will not find "Item B" as in VS 2005, the Group Node is the
Tree Main Node while Item A and Item B are childnodes of Group Node.

Best Regards,

Luqman

"AlexS" <salexru200@SPAMrogers.comPLEASE> wrote in message

news:elFw4d6pHHA.4196@TK2MSFTNGP06.phx.gbl...

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc