Include a DropDown in RadToolBarDropDown

6 posts, 0 answers
  1. Yenza
    Yenza avatar
    10 posts
    Member since:
    Mar 2015

    Posted 20 May 2015 Link to this post

    So I'm using Telerik's gui system and would like to insert a dropdown inside another one but I don't know how to do that.

     

    This is what I've got so far

    <telerik:RadToolBarDropDown runat="server" ToolTip="DropDown1" ImageUrl="~/Images/test.png">
        <Buttons>

              <telerik:RadToolBarButton runat="server" Text="Click me!" Value="TOGGLE_WALLS" CheckOnClick="true" ImageUrl="~/Images/checkmark.png"/>

        </Buttons>
    </telerik:RadToolBarDropDown>

     More or less, a dropdown inside a dropdown.

    Is it possible? Do Telerik support this?

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 25 May 2015 Link to this post

    Hello,

    The RadToolBarDropDown can contain a collection of RadToolBarButtons, and the buttons themselves can use ItemTemplates, which allows different controls to be embedded in them. For instance, you can embed a drop-down control such as the RadComboBox in a RadToolBarButton.

    You can find a demonstration of using ItemTemplates with RadToolBarButton in our ToolBar - Templates demo.

    Regards,
    Ivan Danchev
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Yenza
    Yenza avatar
    10 posts
    Member since:
    Mar 2015

    Posted 25 May 2015 in reply to Ivan Danchev Link to this post

    Right, so I added a ComboBox and it works like a dropdown. However, the functionality to listen to whenever a user picks a choice is gone... usually it's onclientbuttonclicking but it doesn't seem to accept that.
  5. Yenza
    Yenza avatar
    10 posts
    Member since:
    Mar 2015

    Posted 25 May 2015 Link to this post

    this is how far I've gotten:

    <telerik:RadToolBarButton>
                                    <ItemTemplate>
                                        <div style="float:right;">
                                            <telerik:RadComboBox ID="RadComboBox1" runat="server" AllowCustomText="true" EmptyMessage="Background color">
                                                <items>
                                                    <telerik:RadComboBoxItem runat="server" Text="White" Value="BGCOLOR_WHITE"/>
                                                    <telerik:RadComboBoxItem runat="server" Text="Grey" Value="BGCOLOR_GREY"/>
                                                </items>
                                            </telerik:RadComboBox>
                                        </div>
                                    </ItemTemplate>
                                </telerik:RadToolBarButton>

  6. Yenza
    Yenza avatar
    10 posts
    Member since:
    Mar 2015

    Posted 27 May 2015 Link to this post

    Got solution on Stackoverflow:

    <telerik:RadToolBarDropDown runat="server" ToolTip="Dropdown1">

        <Buttons>

            <telerik:RadToolBarButton>

                                    <ItemTemplate>
                                        <telerik:RadDropDownList ID="RadDropDownList1" runat="server" DefaultMessage="Background color" OnClientItemSelected="onClick">
                                            <Items>
                                                <telerik:DropDownListItem runat="server" Text="White" Value="BGCOLOR_WHITE" />
                                                <telerik:DropDownListItem runat="server" Text="Grey" Value="BGCOLOR_GREY" />
                                            </Items>
                                        </telerik:RadDropDownList>
                                    </ItemTemplate>
                                </telerik:RadToolBarButton>
                            </Buttons>
                        </telerik:RadToolBarDropDown>

  7. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 28 May 2015 Link to this post

    Hello,

    To use the RadComboBox or the RadDropDownList in the RadToolBarButton's ItemTemplate is a matter of personal preference and depends on the dropdown features you are looking for.

    The RadComboBox would not accept OnClientButtonClicking, because it does not have this event. Its equivalent for the RadComboBox is the OnClientSelectedIndexChanging event.

    You can find a list of the RadComboBox client-side events in our Client-Side Events
    documentation article.

    Regards,
    Ivan Danchev
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017