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
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
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>
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>
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