RadMenu get_item method

5 posts, 0 answers
  1. Andrew Currie
    Andrew Currie avatar
    19 posts
    Member since:
    Jun 2008

    Posted 03 Dec 2009 Link to this post

    Hi,

    I am getting a javascript error "...has no method 'get_item'" in the following code:

              function InitDocumentsMenu(numberOfItems) {
                   var menu = $find("<%= mnuDocuments.ClientID %>");
                   var topMenuItem = menu.get_items().get_item(0);
    }

    I have a menu item with child menus but this javascript is not working.  The get_count() returns fine.  I don't know what can be the problem??

    Telerik Q2 2009 - 2009.2.826.35

    Thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Dec 2009 Link to this post

    Hi Andrew,

    Give a try with following code and see whether it works fine.

    <script type="text/javascript">
        function access() {
            var menu = $find("<%= RadMenu2.ClientID %>");
            var topMenuItem = menu.get_items().getItem(0);
        }
    </script>

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andrew Currie
    Andrew Currie avatar
    19 posts
    Member since:
    Jun 2008

    Posted 03 Dec 2009 Link to this post

    Thanks - it always helps to read the documentation properly!  What a wally I am!  Thanks again
  5. Mark Galbreath
    Mark Galbreath avatar
    171 posts
    Member since:
    Jul 2009

    Posted 05 Feb 2010 Link to this post

    not your fault; the method name violates Telerik's own naming convention.

    Cheers!
    Mark
  6. bilal
    bilal avatar
    5 posts
    Member since:
    Jul 2010

    Posted 24 Sep 2010 Link to this post

    hi Shuni

    i'm using this function:

    function menuTopNavigation() {
            var menu = $find("<%= menuTopNavigation.ClientID %>");
            var itemToOpen = menu.get_items().getItem(0);
            itemToOpen.open();
        }
    but this always give me the first node in the menu, but i need this to give me the node i clicked on it to keep it open when i clicked on any node keep it open.

    please help me in this.

    Bilal 
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017