Treeview empty after repeated web service calls

2 posts, 0 answers
  1. jlj30
    jlj30 avatar
    101 posts
    Member since:
    Jan 2011

    Posted 13 Jul 2015 Link to this post


    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.


  2. Bozhidar
    Bozhidar avatar
    1095 posts

    Posted 16 Jul 2015 Link to this post


    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?

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top