Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7192029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:51:14+00:00 2026-05-28T19:51:14+00:00

I created two tab panels and each panel has a grid. Listener for Grid

  • 0

I created two tab panels and each panel has a grid.

Listener for Grid A:

Ext.getCmp('AGrid').addListener("rowcontextmenu", function menus(grid, rowIndex, e) {
        if (!grid.contextMenu) {
            grid.contextMenu = new Ext.menu.Menu({
                autoDestroy: false,
                items: [{ id: 'view', text: 'View Content'}],
                currentRowIndex: rowIndex,
                listeners: {
                    itemclick: function (item) {
                        switch (item.id) {
                            case 'view':
                                viewEmailClick(grid.getStore().getAt(this.currentRowIndex).data);
                                break;
                        }
                    }
                }
            });
        }
        this.contextMenu.currentRowIndex = rowIndex;
        e.stopEvent();  // this stops the browser context menu and allows the default grid 
        // show the row context menu here
        this.contextMenu.showAt(e.xy);
    });

Listener for Grid B:

Ext.getCmp('BGrid').addListener("rowcontextmenu", function menus(grid, rowIndex, e) {    
        if (!grid.contextMenu) {
            grid.contextMenu = new Ext.menu.Menu({
                autoDestroy: false,
                items: [{ id: 'view', text: 'View Task'}],
                currentRowIndex: rowIndex,
                listeners: {
                    itemclick: function (item) {
                        switch (item.id) {
                            case 'view':
                                viewTicketClick(grid.getStore().getAt(this.currentRowIndex).data);
                                break;
                        }
                    }
                }
            });
        }
        this.contextMenu.currentRowIndex = rowIndex;
        e.stopEvent();  // this stops the browser context menu and allows the default grid 
        // show the row context menu here
        this.contextMenu.showAt(e.xy);
    });

When I right click on it Grid A works fine, and then right click on Grid B rowcontext menu is not working (just shows small gray dot).

After I turn back to Grid A and right click, it shows two rowcontext menus on Grid A:

screenshot

If I right click on B grid and A grid right click (nothing shows) after turn back to B grid
it show rowcontext menu which contains two lists (reverse order) on Grid B.

Why this kind of things happen?
How can I show properly each grid row context menu?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:51:15+00:00Added an answer on May 28, 2026 at 7:51 pm

    This problem is caused by parameter grid or grid.contextmenu obviously.

    I found the answer.

    The problem is caused by the follwing line.

    items: [{ id: 'view', text: 'View Task'}]
    

    I used same context menu id ‘view’.

    After those name changed like the followings

    items: [{ id: 'viewTask', text: 'View Task'}]
    
    items: [{ id: 'viewContent', text: 'View Content'}]
    

    it works perfect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a custom tab activity which has two different drawables for portrait and
I created an app with two different calculator views, each one with a separate
Have created a small two tab app, then subclassed another view controller to create
I've created two EmacsW32 frames, one for each of my monitors. I want to
I created two tables: Publisher PK, PublisherId, int, not null, indentity +1 PublisherName, varchar(50),
I created two files in the App_GlobalResources folder: SiteResources.en-US.resx SiteResources.sp-SP.resx Both contain a value
I created two very simple Heroku apps to test out the service, but it's
I've created two functions to load expanded views of a month in the archive
I've created two classes, with one of them having an implicit cast between them:
I have created two forms in my Windows Application. One Form acts as a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.