This is a migrated thread and some comments may be shown as answers.

Populate ToolBarDropDown on demand

1 Answer 18 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
max
Top achievements
Rank 1
max asked on 02 Oct 2008, 01:54 PM
Can I populate the ToolBarDropDown client-side in the OnClientDropDownOpening event?

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 02 Oct 2008, 02:03 PM
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.
Tags
ToolBar
Asked by
max
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or