• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 955
  • Last Modified:

Refresh of treeview after delete

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
csharp_learner
Asked:
csharp_learner
  • 3
  • 3
2 Solutions
 
rambovnCommented:
Get the father node.
Delete it
Use fathernode.Expand()
0
 
csharp_learnerAuthor Commented:
How can i get the fathernode?
I used treeview.topnode.expand() with no effect.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
csharp_learnerAuthor Commented:
Sorry for the late reply.
I tried treeview1.Parent. but i couldn't find the Expand property.
0
 
csharp_learnerAuthor Commented:
Thanks treeScadaItems.SelectedNode.Parent.Expand(); worked for me.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now