I have a RadTreeView Bound to the generic List<Category>. Nodes are loaded on Demad.
I have the code :
protected
void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
LoadRootNodes(
TreeNodeExpandMode.ServerSideCallBack);
}
RadTreeView1.DataBind();
}
and
protected
void RadTreeView_NodeExpand(object sender, RadTreeNodeEventArgs e)
{
PopulateNodeOnDemand(e,
TreeNodeExpandMode.ServerSideCallBack);
}
so when I delete Category from the RadTreeView (the delete button is nested in the NodeTemplate), fisrt I call method to delete the category from the database : (CategoriesData.Delete(SelectedNode.Value)) and after that remove the node from the RadTreeView.
(SelectedNode.Remove)
But when I press the refresh Button of the Browser after the node was removed from the TreeView, it appears again.So my question is how I can Refresh the TreeView on delete operation, when i use Load-on demand feature and NodeTemplate.
.
Best Regards Deyana