• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 945
  • 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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

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