Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to find out if a treeview's node has children. HELP?! 1

Status
Not open for further replies.

NipsMG

Programmer
Dec 27, 2000
215
US
I'm trying to find out if a treeview's node has children. If not, I'm going to fill it with children if it contains them.

However, the TreeNodeCollection object does not seem to contain a Count property, so I can't get a count, and i haven't been able to find a "has children" function

Sure I can step through the nodes in the node collection using a for/each loop and use a counter, but that's wicked cheezy.. Does anyone know if there's an easier way to find out if a treeview node has children?

Thanks

--NipsMG
 
TreeNode.GetNodeCount Method
Returns the number of child tree nodes.

 
Thanks..
*Slaps himself in the forehead*

Still recovering from memorial day partying, couldn't find it on my own.


--NipsMG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top