Populate ToolBarDropDown on demand

2 posts, 0 answers
  1. max
    max avatar
    42 posts
    Member since:
    Nov 2007

    Posted 02 Oct 2008 Link to this post

    Can I populate the ToolBarDropDown client-side in the OnClientDropDownOpening event?
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 02 Oct 2008 Link to this post

    Hello Massimo,

    You can add buttons to ToolBarDropDown with the following javascript code:

    function OnClientDropDownOpening(toolBar, args)  
    {  
       var dropDownButton = args.get_item();  
       toolBar.trackChanges();  
       var dropDownChildButton = new Telerik.Web.UI.RadToolBarButton();  
       dropDownChildButton.set_text("Added on the client-side button");  
       dropDownButton.get_buttons().add(dropDownChildButton);  
       toolBar.commitChanges();   

    All the best, Yana
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top