RadCombo in Toolbar

3 posts, 1 answers
  1. Imran
    Imran avatar
    25 posts
    Member since:
    Mar 2009

    Posted 29 Apr 2010 Link to this post


    I have a RadCombo in the template for a RadToolBarButton in the RadToolBarDropDown.

    I want to allow the user to make a selection from the Combo Box and then have him click the RadToolBarButton to perform the post back.

    As soon as a selection is made from the combo box the RadToolBarDropDown closes. 

    I want to be able to leave the RadToolBarDropDown open after a selection has been made in the combo box and hence avoid an extra click which is currently needed to reopen RadToolBarDropDown. 

    I have attached the image with this message.

    Any insight will be greatly appreciated.


  2. Answer
    Yana avatar
    4547 posts

    Posted 05 May 2010 Link to this post

    Hello Imran,

    You should use OnClientDropDownOpening and OnClientDropDownClosed events of the combobox to mark whether the dropdown button should be closed like this:

    <telerik:RadToolBar ID="RadToolBar1" runat="server" OnClientDropDownClosing="dropDownClosing">
            <telerik:RadToolBarDropDown Text="dropdown">
                    <telerik:RadToolBarButton Text="dropdown 1" />
                            <telerik:RadComboBox ID="RadComboBox1" runat="server"  OnClientDropDownOpening="dropDownOpening"
                                    <telerik:RadComboBoxItem Text="item1" />
                                    <telerik:RadComboBoxItem Text="item2" />
                                    <telerik:RadComboBoxItem Text="item3" />

    and the needed javascript:

    <script type="text/javascript">
        var shouldClose = true;
        function dropDownOpening(sender, args) {
            shouldClose = false;
        function dropDownClosed(sender, args) {
            shouldClose = true;
        function dropDownClosing(sender, args) {
            if (!shouldClose)

    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
  4. Imran
    Imran avatar
    25 posts
    Member since:
    Mar 2009

    Posted 05 May 2010 Link to this post

    Sweet it worked like a charm. Thanks.
Back to Top