TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Tal
NA
3
2.2k
Problem in TreeView that has nodes and report that it has'nt
Apr 18 2007 1:59 PM
Adding more then 20 nodes to TREEVIEW all fine here is the simple code:
private void add_Click(object sender, EventArgs e)
{
string st = "node" + cnt.ToString();
TreeNode tn = new TreeNode(st);
tn.Tag = "J" + cnt.ToString();
cnt++;
treeView1.SelectedNode.Nodes.Add(tn);
treeView1.SelectedNode.Expand();
}
BUT if I look at treeView1.HasChildren field its value is == FALSE
there for if I try to get a collection of nodes:
TreeNodeCollection myNodeCollection = treeView1.Nodes;
int myCount = myNodeCollection.Count;
the count is only===> 1 THE ROOT!!!
though I can see the nodes that I have added
and there are more then 20 nodes?????
any clue to whats wrong??
Reply
Answers (
2
)
Analyze an email template and extract information
How to access control properties on other form? (Windows Mobile)