Hello,
I am trying to fill the TreeView using an async method. The first level is loaded an expanded. Subsequent levels are not. Or so it seams. They are loaded, but when expanding a node it expands and immediately collapses. Expanding a second time reveals the nodes loaded earlier.
I included a demo project. Open http://localhost:{port}/tree.
Best regards,
Marcel Gelijk
Thank you for the information, Jens. I have made a note of this for testing. Something is definitely off, and we will be looking into it.
Regards,
Marin Bratanov
Progress Telerik
It is easily reproducible when you change the OnExpand event handler in the "LazyLoading "example code:
Make it "async Task":
- async Task OnExpand(TreeViewExpandEventArgs args) ...
Add "Task.Delay..":
+ await Task.Delay(100);
category.Products.AddRange<Product>(products);}
If Task.Delay is inserted before AddRange, the node triangle just flips to "open" and no items appear. Only after clicking the node again twice.
If it is added behind, the node opens with items shortly appearing (seemingly depending on how long the task delays) and collapses. Opening again behaves correctly.
Regards
Jens
Hello Marcel,
That's very odd and I am logging it for further research. I don't know why the VS debugger would change the behavior. I did reproduce the issue in a WASM app as well, so it is not likely to be caused by the debugger alone.
You can click the Follow button on the feedback portal page to get notifications for status updates.
Regards,
Marin Bratanov
Progress Telerik
Hello Marin,
Thanks for your response.
I am using localhost as well. In my opinion performance/network latency is not an issue.
I saw your video and realized a key difference. The behaviour only occurs when I run the browser with the debuggger attached. This is what I see: Youtube. (It's the same demo project)
Any thoughts on how the Visual Studio interferes with the debug experience?
Best regards,
Marcel Gelijk
Hello Marcel,
The provided sample seems to work fine for me. I am attaching here a short video of the behavior I get so you can confirm if I am missing something. I don't see anything wrong with this treeview sample and it should work.
My best guess at the moment is that either of the following is happening:
Regards,
Marin Bratanov
Progress Telerik