ContextMenu for RadTabStrip Tab

2 posts, 0 answers
  1. Randall
    Randall avatar
    55 posts
    Member since:
    Jun 2008

    Posted 08 Oct 2013 Link to this post


    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?

    Randall Price
    Senior Developer
    Virginia Tech
  2. Kate
    Kate avatar
    1898 posts

    Posted 11 Oct 2013 Link to this post

    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.

    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.
Back to Top