How to show a RadContextMenu when a RadToolBarSplitButton is clicked

4 posts, 0 answers
  1. Tim
    Tim avatar
    57 posts
    Member since:
    Apr 2011

    Posted 20 Oct 2011 Link to this post

    Hi

    I am being asked to present a RadMenu type UI when a RadTooBarSplitButton is being clicked.

    The reason that I am being asked to do this is because your RadToolBarSplitButton only allows one
    layer of buttons in its Item List, and we need a cascading series of buttons.

    So I am attempting to still use the RadToolBarSplitButton and just show a RadContextMenu on the client side click event.

    I have found some example code that calls  the show function on a context menu variable after I find the ContentMenu, however I am unclear on how to associate the menu with my specific button so it appears just below the RadToolBarSplitButton.

    Is the parameter that is passed on the show method the control I want to associate with? 
    Or is there some other mechanism?

    If you have an alternative solution to my functional requirement to show cascading items below a RadToolBar I would love to hear that too

    TIA
  2. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 20 Oct 2011 Link to this post

    Hi Tim,

    I would suggest that you use an ItemTemplate and place a Radmenu control in the RadToolBarSplitButton as exemplified in this demo here. Thus you can have as many levels of child items as you need.

    Kind regards,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tim
    Tim avatar
    57 posts
    Member since:
    Apr 2011

    Posted 21 Oct 2011 Link to this post

    Thanks but I came up with a solution that works for me.

    I found some code on your web-site that shows how to present a RadContextMenu using
    a show method on the context menu object.

    So I just created a java script function to do the work and programmatically wired it up to the
    ToolBarButton onclick event.

    Works great.

    Thanks for you input though
  5. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 21 Oct 2011 Link to this post

    Hi Tim,

    This seems to be a very nice approach as well. Thank you for sharing it with us.

    All the best,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top