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" <> wrote in message
news:...
> 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" <> wrote in message
> news:%...
>>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
>>
>>
>>
>>
>
>
|