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
//removes the node from the DB int remove = SchemaDB.DeleteGenericLink(originNode.Tag),TargetNode.Tag);
if (remove) { originNode.Remove(); } //this if, doesnt remove the originNode from the targetNode.Nodes
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Eyal LewinPosted Dec 30, 2009, 5:58 AM
i wouldn't like to refresh the tree after every remove though.
:)
Eyal LewinPosted Dec 30, 2009, 5:53 AM
i wouldn't like to refresh the tree after every remove though.
:)
Farooq AzamPosted Dec 30, 2009, 5:30 AM
if (remove)
{
originalNode.Remove();
treeView1.Refresh();
}
Thanks