This is a migrated thread and some comments may be shown as answers.

How to show a RadContextMenu when a RadToolBarSplitButton is clicked

3 Answers 56 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 20 Oct 2011, 02:29 PM
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

3 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 20 Oct 2011, 03:47 PM
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
0
Tim
Top achievements
Rank 1
answered on 21 Oct 2011, 11:48 AM
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
0
Kate
Telerik team
answered on 21 Oct 2011, 12:13 PM
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
Tags
ToolBar
Asked by
Tim
Top achievements
Rank 1
Answers by
Kate
Telerik team
Tim
Top achievements
Rank 1
Share this question
or