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

Include a DropDown in RadToolBarDropDown

5 Answers 122 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Yenza
Top achievements
Rank 1
Yenza asked on 20 May 2015, 08:24 AM

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?

5 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 25 May 2015, 06:25 AM
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
0
Yenza
Top achievements
Rank 1
answered on 25 May 2015, 12:24 PM
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.
0
Yenza
Top achievements
Rank 1
answered on 25 May 2015, 12:26 PM

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>

0
Yenza
Top achievements
Rank 1
answered on 27 May 2015, 06:55 AM

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>

0
Ivan Danchev
Telerik team
answered on 28 May 2015, 08:07 AM
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
Tags
DropDownList
Asked by
Yenza
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Yenza
Top achievements
Rank 1
Share this question
or