Dynamic Menu through Javascript

2 posts, 0 answers
  1. Madhu
    Madhu avatar
    8 posts
    Member since:
    Jul 2010

    Posted 11 Mar 2013 Link to this post

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

    Posted 12 Mar 2013 Link to this post

    Hello Madhu,

    Since you have not given any details regarding your requirement, from the thread title I think you want to dynamically create a menu item using JavaScript. Please have a look into the following JavaScript.

    JavaScript:
    function AddNewItem()
    {    
        var menu = $find("<%= RadMenu1.ClientID %>");
        var menuItem = new Telerik.Web.UI.RadMenuItem(); 
        menuItem.set_text("New Item"); 
        menu.trackChanges(); 
        menu.get_items().add(menuItem); 
        menu.commitChanges(); 
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top