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

ContextMenu for RadTabStrip Tab

1 Answer 92 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Randall
Top achievements
Rank 2
Randall asked on 08 Oct 2013, 07:15 PM

Hello,

I am using:

  • RadControls for ASP.NET v. 2013.2.717.40
  • .NET Framework 4.0
  • Windows 7 Enterprise 64-bit
  • Visual Studio 10
  • IE 9 and Firefox 24

I am creating an application based on the Window - RadWindow and MDI demo.  I have this working so far.  The main difference with my application and your demo is that I am using a RadToolBar at the top of the page instead of a RadMenu at the bottom left of the page to open new MDI RadWindows.  This is working fine as well.

I would like to create a ContextMenu for each tab that gets added to the tabstrip.  For example, when a new RadWindow is opened, I want to add a ContextMenu with the following menu items:  Minimize, Maximize, Restore, Arrange Horizontal, Arrange Vertical, Cascade, etc. In addition, depending on the specific RadWindow, I may want to add other menu items.

I initially started looking at how to do this from Javascript, but from what I read on the forums, the ContextMenu being a server control, must be created on the server.  So I would think I could create the ContextMenu in the RadToolBar button click event where I create the new RadWindow.  This seems easy enough but I don't know how to associate the newly created ContextMenu (from my server code) with the newly created Tab (from the Javascript code).

What is the best way to do this?

Thanks,
Randall Price
Senior Developer
Virginia Tech

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 11 Oct 2013, 08:31 AM
Hello Randall,

I would suggest that you take a look at the following help article where it is described in details how you can build a RadContextMenu from code behind - Creating Context Menu at Runtime.

Regards,
Kate
Telerik
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 the blog feed now.
Tags
Menu
Asked by
Randall
Top achievements
Rank 2
Answers by
Kate
Telerik team
Share this question
or