Hi,
I am trying to set a "hover" style to a templated menu (asp:checkbox) using the latest version of RAD controls.
Here is a section of my menu:
I use server side code to set the checkbox state and add a client side onclick method:
I also added client side methods to create a "hover" effect same as the skin I use (Gray).
The result is that only the check box label gets the effect, the rest of the menu stays the same (white).
Is there a way to do this using CSS or javascript for the entire menu item?
I added to my page the following code to create the effect if FireFox (for some reason it did not do it by itself...):
If there is a solution of this type it would be best or even better something like HighlightTemplatedItems in RadComboBox.
Thanks,
Nir.
![]()
I am trying to set a "hover" style to a templated menu (asp:checkbox) using the latest version of RAD controls.
Here is a section of my menu:
| <telerik:RadMenuItem Text="Options" runat="server"> |
| <Items> |
| <telerik:RadMenuItem runat="server"> |
| <ItemTemplate> |
| <asp:CheckBox ID="askatstartup" runat="server" Text="Ask to Auto-configure at startup" /> |
| </ItemTemplate> |
| </telerik:RadMenuItem> |
| <telerik:RadMenuItem runat="server"> |
| <ItemTemplate> |
| <asp:CheckBox ID="sortedtree" runat="server" Text="Show sorted tree" /> |
| </ItemTemplate> |
| </telerik:RadMenuItem> |
| </Items> |
| <GroupSettings Width="250" /> |
| </telerik:RadMenuItem> |
| RadMenuItem oOptions = oRadMenu.FindItemByText("Options"); |
| // put the value on the checkbox and add an event |
| CheckBox oCheck = (CheckBox)oOptions.Items[0].FindControl("askatstartup"); |
| oCheck.InputAttributes.Add("onClick", "OptionsCheckBoxClicked('askatstartup', this.checked);"); |
| oCheck.Attributes.Add("onMouseOver", "this.style.background = '#dfdfdf';"); |
| oCheck.Attributes.Add("onMouseOut", "this.style.background = '#fff';"); |
The result is that only the check box label gets the effect, the rest of the menu stays the same (white).
Is there a way to do this using CSS or javascript for the entire menu item?
I added to my page the following code to create the effect if FireFox (for some reason it did not do it by itself...):
| .rmVertical .rmItem .rmLink:hover { |
| background:#dfdfdf !important; |
| color: #6b6b6b !important; |
| }} |
Thanks,
Nir.