now the problem here is that it is making sub menus. i want to the menu to change my pages on the main menus not the sub. i used the Hyperlink button based on one of the Examples. i just want the main item only not the sub
8 Answers, 1 is accepted
answered on 24 Feb 2011, 08:51 AM
The ContentProperty of RadMenuItem is Items which means that everything that is inside RadMenuItem will go as its child (in this case sub menuitem).
If you want to add the HyperlinkButton as a header you should add it to RadMenuItem Header property like this:
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
I used the above method and the problem now is that there is a small region where the context menu item is selected, can be clicked, but nothing happens. How can the hyperlinkbutton be stretched to fill the entire rad menu item? If you put a background color on the hyperlink button you can see the region that is clickable but doesn't click the hyperlinkbutton.
It is also very apparent with the icon part of the menu item. Clicking the icon part does nothing. For now we got rid of the icon by setting the icon column to 0.
We can not use the radMenuItem click handler to open a page because hyperlinkbutton is the only one that wont be blocked by popups.
Thanks in advance!
answered on 27 Jan 2012, 08:42 AM
Could you please give us some more details about the issue, so that we can reproduce it? Ideally, if you could send us a sample project illustrating the problem it will be very helpful for tracking down its source. Also, could you please share with us with which version of the control you are experiencing the issue?
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I have attached the project. You will notice there are regions where the menu item "export" is selected but the hyperlinkButton inside is not clickable. I need the hyperlinkbutton to fill the entire area so that clicking the selected menu item is the same as clicking the hyperlink. It has to be user initiated because otherwise some browsers block the popup even if in the same domain.
There are some paddings in the template of the MenuItem, which are causing these blank spaces. In order to avoid them, without restyling the menu I can suggest you to set a negative Margin to the HyperlinkButton, for example:
Negative margin did nothing. Did you run the code at all? Where you set the background to green you can see when the menu item is selected there is lots of space where the hyperlink button is not clickable.
answered on 08 Feb 2012, 01:38 PM
I did try the code, but it fits for this particular arrangement of the items. If some of the items in the menu are longer the Margin is not doing a good job. That is why I can suggest you to set an ItemContainerStyle to the menu with Padding=0, for example: