This is a migrated thread and some comments may be shown as answers.

Treeview empty after repeated web service calls

1 Answer 27 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
jlj30
Top achievements
Rank 2
jlj30 asked on 13 Jul 2015, 05:35 PM

Hi,

Let me describe the scenario.

I have a page with a treeview on the left side and a diagram (using a 3rd party tool) on the right.

The treeview is built in code behind and is not modified on the client.

The user right-clicks on a shape on the diagram and selects an item from a context menu.

This causes a radWindow to open.  When the user clicks on Save, a web service is called to update the database.

The window is closed and everything is fine.

However, if the user opens the radWindow and clicks Save four times (or more) and then clicks on a button to navigate to the next diagram, an error occurs:

System.ArgumentOutOfRangeException: Index was out of range

I have put a break in my code behind where the error is occurring and it appears that the treeview is suddenly empty - no nodes!!

There is nowhere in the scenario I presented above where the treeview is touched in any way, so I'm at a loss as to how it became empty.

Could this possibly be session related?  I'm not familiar enough with web services (using an asmx file) to know whether the web service could be affecting the same session storage that is used by the trreeview.

Is there any other reason that the treeview would suddenly be empty?

I can post code snippets, but I'm afraid that might be overwhelming for this forum.

Any ideas?  Suggestions for debugging?

Thanks in advance.

Jim

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 16 Jul 2015, 08:18 AM
Hello,

It's difficult to say what might be causing the issue, without any context of how exactly the TreeView is DataBound, what is used inside the WebService, and what actions are triggered on the button click. It would be best if you could send us a runnable sample page that we can debug locally. You can open a support ticket and attach the project there.

On a side note, if you are building the TreeView manually, and then the nodes are cleared, it appears that the issue might not be caused by the TreeView control. Could you also try to switch the RadTreeView with the ASP.TreeView control to see if the issue is reproduced?

Regards,
Bozhidar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TreeView
Asked by
jlj30
Top achievements
Rank 2
Answers by
Bozhidar
Telerik team
Share this question
or