Solved

Refresh of treeview after delete

Posted on 2009-05-20
6
927 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 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