RadMenu Web Service caching

4 posts, 0 answers
  1. Michael Johnston
    Michael Johnston avatar
    1 posts
    Member since:
    Jun 2007

    Posted 27 Jun 2008 Link to this post

    When populating a RadMenu using the WebService feature, is it possible to call the WebService every time the menu is opened? 

    Opening the menu for the first time executes the WebService code, however opening the menu after that happens without going to the WebService code (it must be cached somewhere). Is there a way to set the timeout on this cache or are the results essentially static after initally loading?

    In our application the contents of the RadMenu need to change dynamically within the same browser session. We're currently playing with using the new WebService feature instead of regular data binding to achieve this functionality - is this outside the the intended functionality?
  2. Veselin Vasilev
    Veselin Vasilev avatar
    2992 posts

    Posted 30 Jun 2008 Link to this post

    Hi Michael,

    This is not possible out of the box. Once the item loads its child items from WebService, its expand mode is set to client-side, so the items are cached.
    To workaround this I suggest that you subscribe to the OnClientItemClosed event and define its event handler as follows:

    function OnClientItemClosedHandler(sender, eventArgs)  
        var item = eventArgs.get_item();  
        //clear the child items  
        //set the expand mode back to WebService  
        item._itemsLoaded = false;  

    We will do our best so that in the next version of the menu all this (setting the expand mode and the _itemsLoaded variable) will be done automatically when you call the clear() method.

    I hope this helps.

    All the best,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
  4. piotre6
    piotre6 avatar
    18 posts
    Member since:
    Apr 2011

    Posted 19 Sep 2012 Link to this post

    Hi I have a problem with given solution.Everything is fine if I click item from first level of menu.
    If anything is clicked on levels 2+, next time when menu should appear I got following error:

    Unable to get value of the property '_getChildren': object is null or undefined
  5. Boyan Dimitrov
    Boyan Dimitrov avatar
    1728 posts

    Posted 24 Sep 2012 Link to this post


    Considering the fact that last response to this ticket was almost 4 years ago the information here might be not relevant at this moment . I suggest you to open a new ticket and discuss your issue there, so we can avoid any further confusion.
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top