Results 1 to 2 of 2

Thread: ActionColumn: how to generate items from outside column definition

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    3
    Answers
    1

    Default Answered: ActionColumn: how to generate items from outside column definition

    Hi,

    I have a grid whose columns' basic config details like id, dataindex, header, width, hidden, sortable properties are being saved in a string value. When user next time visits the page, the config is read from the string value and grid is formed accordingly. My action column which looks like this when saved to string - is blank (no icons show up)

    {
    "id": "shipmentActions",
    "dataIndex": {},
    "header": "general.actions",
    "hidden": "false",
    "width": "80",
    "locked": "false",
    "sortable": "false"
    }

    Hence, I need to be able to repopulate the items after this logic is run.
    This is how my column is structured:
    Code:
                {       id: 'myActionColm',
                        stateId : 'myActionColm',
                        header: 'general.actions',
                        xtype: 'actioncolumn',
                        menuDisabled: true,
                        sortable: false,
                        align: 'center',
                        text: '',
                        width: 80,
                        items: [
                                {
                                    icon   : somePath,
                                    tooltip: someTip,
                                    handler: function(grid, rowIndex, colIndex) { 
                                         //code
                                    },
                                    getClass: function(v, meta, rec) {
                                    //code
                                   }
                                },
                                {
                                    icon   : somePath,
                                    tooltip: someTip,
                                    handler: function(grid, rowIndex, colIndex) {
                                        //code
                                    },
                                    getClass: function(value, metadata, record, rowIndex, colIndex, store){
                                       //code
                                    }
                            }
                        ]
                    }
    Any guidance on how to re-populate my action column would be life saving!

    Edit: Have tried adding the items programatically after the columnsArr is populated, so that the array has items property for actionColumn.
    Yet, the column is still blank on screen.


    Thanks a lot!

  2. Hi,

    I was able to resolve this by merely adding the xtype to the re-populated config object.
    Code:
    retObj['xtype'] = 'actioncolumn';
    Hopefully this would help someone else.

    Thanks!

  3. #2
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    3
    Answers
    1

    Default

    Hi,

    I was able to resolve this by merely adding the xtype to the re-populated config object.
    Code:
    retObj['xtype'] = 'actioncolumn';
    Hopefully this would help someone else.

    Thanks!

Similar Threads

  1. write especific values on Axis renderer in Gauge chart
    By wemerson.januario in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 16 Jul 2018, 4:39 AM
  2. Ext.ux.grid.BufferView and actioncolumn custom renderer
    By stjepano in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 11 Jan 2013, 1:06 PM
  3. extjs actioncolumn renderer prevents handler
    By dmenin in forum Sencha GXT Q&A
    Replies: 1
    Last Post: 13 Oct 2012, 11:03 PM
  4. ActionColumn renderer how to call
    By schoonmoeder in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 27 Aug 2010, 2:21 AM
  5. how to write the '-' in php items
    By hui2008 in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 30 Jun 2008, 5:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •