I've written the following code to remove a node from a treeview. The
node data isremoved, butthe node is still there. Apparently I need to
force a refresh, as the selected node does go away when I navigate away
and back to the page.
Can anyone help? Thanks Eyal
C#
//removes the node from the DBintremove = SchemaDB.DeleteGenericLink(originNode.Tag),TargetNode.Tag);
if (remove)
{
originNode.Remove();
}
//this if, doesnt remove the originNode from the targetNode.Nodes
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Farooq Azam4 pointsPosted Dec 30, 2009, 12:30 AM EST
if (remove)
{
originalNode.Remove();
treeView1.Refresh();
}
Thanks
Eyal Lewin12 pointsPosted Dec 30, 2009, 12:53 AM EST
i wouldn't like to refresh the tree after every remove though.
:)
Eyal Lewin12 pointsPosted Dec 30, 2009, 12:58 AM EST
i wouldn't like to refresh the tree after every remove though.
:)