Hello All,
Need an urgent help.
I am using the Radmenuitem in a User Contol and in Master Page.
I am trying to highlight the menu selected with different color else the user is lost in which menu is looking into.
I have to work on the Client side code, becuase when i click on the Menus the Page Load doesn't get called the Menu.ascx file.
Please help me with Setting teh CSS class on Client side when the Menu item is clicked.
I tried using OnClientItemClicked() but seems no difference.
Please find the code below.
<
radM:RadMenu
ID
=
"mnuImport"
Width
=
"90%"
runat
=
"server"
Skin
=
"Black"
OnClientItemClicked
=
"ClientCSS();"
CssClass
=
"menu"
>
<
Items
>
<
radM:RadMenuItem
Text
=
"Home"
NavigateUrl
=
"../home.aspx"
></
radM:RadMenuItem
>
<
radM:RadMenuItem
Text
=
"File"
NavigateUrl
=
"../home.aspx"
></
radM:RadMenuItem
>
<
radM:RadMenuItem
Text
=
"Edit"
NavigateUrl
=
"../home.aspx"
></
radM:RadMenuItem
>
<
radM:RadMenuItem
Text
=
"View"
NavigateUrl
=
"../home.aspx"
></
radM:RadMenuItem
>
</
Items
>
</
radM:RadMenu
>
function ClientCSS(sender, eventArgs)
{
var menu = $find("<%= rmstabmenu.ClientID %>");
var item = menu.findItemByText(home);
if (item != null)
{
item.CssClass = "Focussed";
}
}
<
style
>
.Focused
{
color: Red !important;
background-color: Yellow !important;
}
</
style
>