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

RadMenu_ItemClick not firing on MasterPage

2 Answers 119 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 01 Aug 2008, 09:26 PM
Hi..
I have a masterpage with a RadMenu...  the RadMenu_ItemClick fires but only 'captures'  the Item in the Root of the Menu
It does not fire for the 'child' menu items.  Any ideas?  thanks!!!!!!!!!





<telerik:RadMenu ID="RadMenu" Runat="server" skin="Web20"

BorderStyle="None" style="top: 0px; left: 0px; width: 970px"

onitemclick="RadMenu_ItemClick" >

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

<Items>

 

<telerik:RadMenuItem runat="server" Text="Home" Font-Size="Larger"

ImageUrl="img\home.png" ToolTip="Home" NavigateUrl="default.aspx">

 

</telerik:RadMenuItem>

 

<telerik:RadMenuItem runat="server" Text="Records" Font-Size="Larger"

ImageUrl="img\server_mail.png" ToolTip="Records">

 

<Items>

 

<telerik:RadMenuItem runat="server" Text="Search Constituents Records"

ImageUrl="img\businessman_find.png"

NavigateUrl="/pages/SearchConstituentRecords.aspx">

 

</telerik:RadMenuItem>

 

<telerik:RadMenuItem runat="server" Text="Add Constituents Records"

ImageUrl="img\businessman_add.png"

NavigateUrl="/pages/AddConstituentRecords.aspx">

 

</telerik:RadMenuItem>

 

<telerik:RadMenuItem runat="server" Text="Update Constituents Records"

ImageUrl="img\businessman_preferences.png"

NavigateUrl="pages/UpdateConstituentRecords.aspx">

 

</telerik:RadMenuItem>

 

</Items>

 

</telerik:RadMenuItem>

.................








2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 02 Aug 2008, 09:47 AM
Hello Jon,

I noticed that you set the NavigateUrl property for some items. In this case, it is expected that the ItemClick event will not fire, since clicking on such an item will cause redirecting to the page specified by the NavigateUrl property.

If you need to capture the ItemClick event but navigate to a page afterwards, you can use the Value property or a custom attribute to store the NavigateUrl and call Response.Redirect(). For example:

protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)  
{  
    //execute your custom logic here and call Response.Redirect:  
    Response.Redirect(e.Item.Attributes["CA_NavigateUrl"]);          


Regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jon
Top achievements
Rank 1
answered on 02 Aug 2008, 01:29 PM
thanks again for great support!
Tags
Menu
Asked by
Jon
Top achievements
Rank 1
Answers by
Peter
Telerik team
Jon
Top achievements
Rank 1
Share this question
or