Hey
I have the situation, where I load orders from customers and show them as TreeView.
I try to load only the first couple of orders and when the customer has more then a specific amount of orders, then I show a special treeview node.
When this special treeview node is clicked, then the next orders get loaded (like paging)
The issue now is, that the specific treeview node does not get removed from the list.
I use the following code:
I tried but I can’t reproduce. I didn’t understand exactly what the flow is from the code you posted. I did this:
private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
this.treeView1.Nodes.Add(“One”);
this.treeView1.Nodes.Add(“Two”);
this.treeView1.Nodes.Remove(e.Node);
}
And it works fine all the times.
Additionally, the code you pasted seems to come from Winforms which didn’t support “lazy” loading of nodes. Also, although Wisej does a great job in hiding the fact that it’s a web applications, it’s still a web application and nothing happens on the client until the request is completed – setting ShowLoader = true/false in the same code execution flow will simple update the client with false (the last value).
A better approach is to set a parent node to be a “lazy” load node:
HTH
Hey
THX – you are right. It is working pretty well, when I try to remove from the correct node…
Sorry, was my mistake!
Please login first to submit.