check if treeview's treenode with a specified text exists

  • Thread starter Thread starter =?ISO-8859-1?Q?S=E9rgio_Almeida?=
  • Start date Start date
?

=?ISO-8859-1?Q?S=E9rgio_Almeida?=

greetings

how can i check if a treeview contains a treenode with a specified text?
i'm trying with the Nodes.Contains() method but doesn't work. Any ideas?

Thanks

Almeida
 
Try this..............

private void treeView1_DoubleClick(object sender, System.EventArgs e)
{
statusBar1.Panels[0].Text = treeView1.SelectedNode.Text;
}


meh
 
I don't think that answers my question.

I'm reading data from a database, and the data is categorized (ex cars,
bikes, trucks, etc). what I want to do is to group on tree nodes the
category of data and then display on child tree nodes the description of
the items within the category. any ideas? If I use the
treeview.Nodes.Contains(new TreeNode("cars")), it does not work.

TIA

Almeida
Try this..............

private void treeView1_DoubleClick(object sender, System.EventArgs e)
{
statusBar1.Panels[0].Text = treeView1.SelectedNode.Text;
}


meh

greetings

how can i check if a treeview contains a treenode with a specified text?
i'm trying with the Nodes.Contains() method but doesn't work. Any ideas?

Thanks

Almeida
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top