Solved

Refresh of treeview after delete

Posted on 2009-05-20
6
918 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
  • 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now