+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / Click to open, stay open

Click to open, stay open

6 posts, 0 answered
  1. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    02 Nov 2007
    Link to this post
    Hello telerik,

    I've a question regarding the r.a.d.menu.

    On my site I have a menu which is based on the Sitefinity menu with the 'Default' skin. The following behaviour I'd like to achieve, but I don't know how:

    - User clicks on the menu to open it.
    - User clicks on a menu-item (root or sub, doesn't matter)
    - Page navigates to the desired page, but the menu stays open and the selected item also is highlighted.
    - If a sub menu-item is selected, it has to be highlighted, but also it's root menu-item should be highlighted.

    I've looked to the example 'ClickToOpen' inside my r.a.d.menu documentation, but that isn't exactly what I want. Also, when the page is doing its postback, then the menu doesn't stay open.

    Anyone has already dealed with this?

    Thanks,
    Daniel
  2. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    02 Nov 2007
    Link to this post
    Hello Daniel,

    Perhaps you could use the SiteMenu control provided with Sitefinity. It automatically marks the current node as selected and adds "selectedItem" class for all the parents of this item. You should also implement css styles for that class in order to see the selection path. To use it, you should add it in every page or it would be much easier to do that via template.

    Would that do the trick or am I missing something?

    Regards,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    06 Nov 2007
    Link to this post
    Hello Vassil,

    Thanks for the reply. This worked. I forgot to also implement the .selectedItem class for the .group and .last elements...

    Another thing I can't get to work is the following:
    If I selected a menu-item, I want the menu to remain opened when a postback has occured. So now the menu is collapsing after clicking a menu-item, but I want it to just stay open.

    Is this possible with the r.a.d.menu?

    Thanks,
    Daniel
  4. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    06 Nov 2007
    Link to this post
    Hi Daniel,

    The required functionality could be easily achieved with RadPanelbar. For more information on this matter, please have a look at the following examples:

    1. Programmatic State Persistence
    2. Expand Behavior

    Hope this helps.

    Kind regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    06 Nov 2007
    Link to this post
    Hello telerik,

    Nice to know that it could be achieved with r.a.d.panelbar, but I'm using a r.a.d.menu control? So you suggest I use a panelbar instead of a menu?

    I don't think that will work, since I use specific menu functionality.

    Please let me know if I'm wrong?

    Daniel
  6. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    07 Nov 2007
    Link to this post
    Hello Daniel,

    The RadMenu control does not provide such built-in functionality. So you need to implement this on your own to achieve the required functionality. You can have a look at the following online examples and their implementation that might help you:

    1. Click To Open
    2. Show Path

    Also, I would suggest you review the RadMenu client-side API and in particular the following topics:

    1. The RadMenu client object
    2. The RadMenuItem client object

    Hope this is helpful.

    Kind regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
6 posts, 0 answered