JavaScript Get Extjs grid on which context menu item is clicked

I have a Grid and on grid context menu I am calling one function as follows-

On grids context menu I have added the following item

{ text: 'Preview', handler: 'PreviewGrid', scope: cnt, };

In controller-

previewGrid: function (contextMenuItem) {    
        // Here I am getting the item i.e. contextmenu item.
        // But I want here is grid on which there was right click
}

I tried using item.ownerCt.up('grid')

but it is not working.

Any help will be appreciated.

Answer:1

For example: var array1 = ["one", "two", "three"]; var array2 = ["1", "2", "3"]; How to turn these arrays to var array = [["one", "1"], ["two", "2"], ["three", "3"]]?

For example: var array1 = ["one", "two", "three"]; var array2 = ["1", "2", "3"]; How to turn these arrays to var array = [["one", "1"], ["two", "2"], ["three", "3"]]?

I have a function that returns the filtered result based on string in the object (if it exist or not) let foo = nodes.reduce((arr, cur) => { cur.classes.split(' ').filter((el) => { ...

I have a function that returns the filtered result based on string in the object (if it exist or not) let foo = nodes.reduce((arr, cur) => { cur.classes.split(' ').filter((el) => { ...

I need to build a 2 way communication between a browser and an REST API service. One of the most complex thing I am facing is checking the API for updates every second. I have two types of ...

I need to build a 2 way communication between a browser and an REST API service. One of the most complex thing I am facing is checking the API for updates every second. I have two types of ...

  1. websocket communicate with each other
  2. websocket communication

So, I have this array of objects: var obj = [{ "Has the house been sold?": "N" }, { "Is the house on the market?": "Y" }, { "Duration of Sale": "2 weeks" }]; and I am trying to turn it ...

So, I have this array of objects: var obj = [{ "Has the house been sold?": "N" }, { "Is the house on the market?": "Y" }, { "Duration of Sale": "2 weeks" }]; and I am trying to turn it ...

  1. javascript return object from function
  2. javascript return object literal
  3. javascript return object values
  4. javascript return object from array
  5. javascript return object key
  6. javascript return object from map
  7. javascript return object type
  8. javascript return object object
  9. javascript return object name
  10. javascript return object undefined
  11. javascript return object from promise
  12. javascript return object without property
  13. javascript return object property
  14. javascript return object from foreach
  15. javascript return object as json
  16. javascript return object from callback
  17. javascript return object with new property
  18. javascript return object with highest value
  19. javascript return object from anonymous function
  20. javascript return object as string