Kapil Jain
Top achievements
Rank 2
Kapil Jain
asked on 21 Jan 2008, 09:07 AM
Hi,
I want to have "ClickToOpen" Menu that i created after setting the property "ClickToOpen=true" in aspx page. Finally my aim is to open all menu item on click not on mouseover. Currently this feature is applicable on first click attempt. Example: If i am clicking on first menu item this will get unfold but at the same without clicking anywhere if i mousemove in second item, the mouseover item will also get unfold. So i want exclusive clicktoopen property so that Items will be open on click not on mouseover.
Even in Teleriks example
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Menu/Examples/Functionality/ClickToOpen/DefaultCS.aspx
First attempt would be click then same time mouseover will unfold second menuitem. but it should be open on click in my requirement.
Regards,
Kapil
I want to have "ClickToOpen" Menu that i created after setting the property "ClickToOpen=true" in aspx page. Finally my aim is to open all menu item on click not on mouseover. Currently this feature is applicable on first click attempt. Example: If i am clicking on first menu item this will get unfold but at the same without clicking anywhere if i mousemove in second item, the mouseover item will also get unfold. So i want exclusive clicktoopen property so that Items will be open on click not on mouseover.
Even in Teleriks example
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Menu/Examples/Functionality/ClickToOpen/DefaultCS.aspx
First attempt would be click then same time mouseover will unfold second menuitem. but it should be open on click in my requirement.
Regards,
Kapil
6 Answers, 1 is accepted
0
Hello Kapil Jain,
To achieve your goal consider the sample code below:
I hope this helps.
Regards,
Veskoni
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
To achieve your goal consider the sample code below:
- Hook on the OnClientMouseOver event:
<telerik:RadMenu ID="RadMenu1" runat="server" |
ClickToOpen="True" Flow="Horizontal" |
OnClientItemClicking="beforeClientClick" |
OnClientMouseOver= "OnClientMouseOverHandler"> |
- Define the OnClientMouseOver event handler as follows:
function OnClientMouseOverHandler(sender, eventArgs) |
{ |
if (eventArgs.get_item().get_parent() == sender) |
{ |
sender._clicked = false; |
} |
} |
I hope this helps.
Regards,
Veskoni
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
lakshmi
Top achievements
Rank 1
answered on 25 Apr 2008, 08:15 PM
Hi,
I have the same problem and implemented the OnClientMouseOver. it was worked in old version and not working in Telerik Q1 2008 Version=2008.1.415.20. Is this bug or any fix for this? please help me to resolve this.
Dhana
I have the same problem and implemented the OnClientMouseOver. it was worked in old version and not working in Telerik Q1 2008 Version=2008.1.415.20. Is this bug or any fix for this? please help me to resolve this.
Dhana
0
Hello lakshmi,
It is working with the new version too. I have attached a test project so you can download it and give it a try.
Best wishes,
Veskoni
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
It is working with the new version too. I have attached a test project so you can download it and give it a try.
Best wishes,
Veskoni
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
lakshmi
Top achievements
Rank 1
answered on 28 Apr 2008, 01:44 PM
Hi,
For my case, am loading the grid based on the item selected from the menu through ajax call. In the ajax request end am closing the the menuitems.
var menu = $find("<%= menuSettings.ClientID %>");
menu.close();
But the focus is still in the menu, when i move the mouse over, again it shows the menu items not in the click event. it should show the menu item when i click on the menu.
From your sample once i selected any menu, menuitems remains open and i selected anothe menu it close the previous and it opens the new items.
could you please help me to resolve this?
-Dhana
For my case, am loading the grid based on the item selected from the menu through ajax call. In the ajax request end am closing the the menuitems.
var menu = $find("<%= menuSettings.ClientID %>");
menu.close();
But the focus is still in the menu, when i move the mouse over, again it shows the menu items not in the click event. it should show the menu item when i click on the menu.
From your sample once i selected any menu, menuitems remains open and i selected anothe menu it close the previous and it opens the new items.
could you please help me to resolve this?
-Dhana
0
Hi lakshmi,
I suggest that you call this:
sender._clicked = false;
after calling the close() method:
Hope this helps.
Kind regards,
Veskoni
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I suggest that you call this:
sender._clicked = false;
after calling the close() method:
var menu = $find("<%= menuSettings.ClientID %>"); |
menu.close(); |
menu._clicked = false; |
Hope this helps.
Kind regards,
Veskoni
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
lakshmi
Top achievements
Rank 1
answered on 30 Apr 2008, 04:55 PM
Hi Veskoni ,
I tried that also befor sending the reply to you, it was not working.
now i removed the below method
OnClientMouseOver= "OnClientMouseOverHandler"
added only var menu = $find("<%= menuSettings.ClientID %>"); |
menu.close(); |
menu._clicked = false; |
It is working fine. Thanks
-Lakshmi