Solved

Refresh of treeview after delete

Posted on 2009-05-20
6
926 Views
Last Modified: 2012-05-07
Hi,
I've included a right click function on a treeview1 to delete a gandchild node.
But the thing is after deleting I want the treeview1 to refresh so that the user can't see the deleted granchild node.

I tried treeview.Refresh();but it did'n work.I hope someone can offer me some help or advice.
Thanks in advance.
0
Comment
Question by:csharp_learner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 8

Expert Comment

by:rambovn
ID: 24429882
Get the father node.
Delete it
Use fathernode.Expand()
0
 

Author Comment

by:csharp_learner
ID: 24437484
How can i get the fathernode?
I used treeview.topnode.expand() with no effect.
0
 
LVL 8

Accepted Solution

by:
rambovn earned 500 total points
ID: 24448603
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:csharp_learner
ID: 24463870
Sorry for the late reply.
I tried treeview1.Parent. but i couldn't find the Expand property.
0
 
LVL 8

Assisted Solution

by:rambovn
rambovn earned 500 total points
ID: 24466583
0
 

Author Comment

by:csharp_learner
ID: 24469569
Thanks treeScadaItems.SelectedNode.Parent.Expand(); worked for me.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question