|
protected void btnDelSub_Click (object sender, EventArgs e)
{
string strParentID = this.tvwType.SelectedNode.Value.ToString (). Trim ();
string strParent = this.tvwType.SelectedNode.Value.ToString (). Trim () + ",";
this.tvwType.SelectedNode.ChildNodes.Clear ();
}
In this way, only the nodes below the selected node can be deleted, but the node itself cannot be deleted.
How to delete the selected node in TreeView? |
|