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

RadMenu ItemClick Not Firing with ItemTemplate

1 Answer 65 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Donna asked on 10 Oct 2014, 01:15 PM
I am trying to get a horizontal list of RadButtons.  So far, the best way I've been able to accomplish this is by using a RadMenu, and adding an ItemTemplate containing a RadButton.
However, this causes the menu's ItemClick to not fire.

Is there a way to use the itemtemplate to force the menu options to look like radbuttons, and still have the ItemClick event fire?  Or is there a better way to get a horizontal list of buttons?  (I had just a bunch of buttons, but I want to share the click event and just look for the clicked one, rather than having separate button click events).

Thanks for any help!
 Here's my markup:
<telerik:RadMenu ID="radMenuRegions" runat="server" Width="100%" BackColor="White"  Skin="" OnItemClick="radMenuRegions_ItemClick"  >
                    <telerik:RadButton ID="radBtn" runat="server" Text='<%# DataBinder.Eval(Container, "Text")%>' Skin="WebBlue" Width="100px" Font-Names="Arial" Font-Size="14pt" Height="65px" style="margin:20px;" OnClick="radBtn_Click"></telerik:RadButton>
                    <telerik:RadToolTip ID="toolTip" runat="server" TargetControlID="radBtn" Title='<%# DataBinder.Eval(Container, "Text")%>' Skin="WebBlue" Text='<%# DataBinder.Eval(Container, "Value")%>'></telerik:RadToolTip>
                    <telerik:RadMenuItem Text="East" Value="1"  />
                    <telerik:RadMenuItem Text="Main/FHC" Value="2" />
                    <telerik:RadMenuItem Text="Medina" Value="3" />
                    <telerik:RadMenuItem Text="West" Value="4" />
                    <telerik:RadMenuItem Text="Wooster" Value="5" />

1 Answer, 1 is accepted

Sort by
Dimitar Terziev
Telerik team
answered on 13 Oct 2014, 07:20 AM

You could use the OnClick event of the RadButton on order to perform the server side logic. Attached is a sample page.

Dimitar Terziev

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question