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

  • SEARCH
  • Home
  • 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 6116175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:10:34+00:00 2026-05-23T15:10:34+00:00

I have an action column in my grid which is needed to perform lots

  • 0

I have an action column in my grid which is needed to perform lots of non-trivial operations after click on it. I don’t want to use the handler method only to avoid duplicity in my code. I want to handle the click event from the controller method which can be called from more sides.

Here is my definition of action column:

{
    header: translator.translate('actions'),
    xtype: 'actioncolumn',
    width: 50,
    items:[{
        id     : 'detailContactPerson',
        icon   : '/resources/images/pencil.png',
        tooltip: translator.translate('show_detail')
    }]
},

But now I don’t know how to write the Component query definition to set up listener.

 init: function() {
    this.control({
       'detailContactPerson': {
           click: function(obj) {
                 var contactPerson = obj.up('container').contactPerson;
                 this.detail(contactPerson);
            }
         },

Second way I’ve tried is to call the method of controller directly from handler method. It looks like this:

  {
    header: translator.translate('actions'),
    xtype: 'actioncolumn',
    width: 50,
    items:[{
        id     : 'detailContactPerson',
        icon   : '/resources/images/pencil.png',
        handler: function(contactPerson){
            Project.controller.contactPerson.detail(contactPerson);
        },
        tooltip: translator.translate('show_detail')
    }

But unfortunately it isn’t supported way to call controller method (No method exception raised).

Could someone help me to construct working Component query, or show some example how to call controller method from outside?

  • 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-23T15:10:35+00:00Added an answer on May 23, 2026 at 3:10 pm

    try actioncolumn#detailContactPerson

    or you can listene to actioncolumn ‘s click event

    see this: http://www.sencha.com/forum/showthread.php?131299-FIXED-EXTJSIV-1767-B3-ActionColumn-bug-and-issues

    init: function() {
            this.control({
                'contact button[action=add]':{
                    click: this.addRecord 
                },
                'contact button[action=delete]':{
                    click: function(){this.deleteRecord()} 
                },
                'contact actioncolumn':{
                    click: this.onAction
                }
            });
        },
        onAction: function(view,cell,row,col,e){
            //console.log(this.getActioncolumn(),arguments, e.getTarget())
            var m = e.getTarget().className.match(/\bicon-(\w+)\b/)
            if(m){
                //选择该列
                this.getGrid().getView().getSelectionModel().select(row,false)
                switch(m[1]){
                    case 'edit':
                        this.getGrid().getPlugin('rowediting').startEdit({colIdx:col,rowIdx:row})
                        break;
                    case 'delete':
                        var record = this.getGrid().store.getAt(row)
                        this.deleteRecord([record])
                        break;
                }
            }
        }
    

    BTW.I prefer to use these to instead of AcionColumn

    • Ext.ux.grid.column.ActionButtonColumn
    • Ext.ux.grid.RowActions
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a grid view will two different button columns. I want to perform
I have two action methods that are conflicting. Basically, I want to be able
I have an action in one of my controllers which creates a downloadable zip
I have the following JQ-Grid with a formatter function which returns some HTML as
Explanation: I have a grid with a checkbox column where users can check records
I have a column in a grid that contains dropdown list. The row also
My jstree uses jstree-grid, and one of the columns includes an action menu (which
I have a page with 3 different frames which form a complete grid ..
I have a WPF App which is grinding to a halt after running out
I have a Default.aspx page in which I have bind a Grid. In the

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.