1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    25
    Answers
    6
    Vote Rating
    0
    Mteixeira is on a distinguished road

      0  

    Default Answered: Renderer Action Column

    Answered: Renderer Action Column


    I have this on a grid:

    Code:
    {                xtype: 'actioncolumn',
                    renderer: function (val, metadata, record) {
                        if (record.raw.possibleActions != 2) {
                            this.items[0].icon = '';
                            this.items[0].tooltip = '';
                        }
                        
                        metadata.style = 'cursor: pointer;';
                        return val;
                    },
                    width: 30,
                    align: 'center',
                    sortable: false,
                    items: [{
                        icon: 'images/edit.png',
                        tooltip: 'stuff',
                        handler: function (grid, rowIndex, colIndex) {
                            'do stuff'
                        }
                    }]
                },
    I want that when the field "possibleActions" is different than 2 to hide/remove the action column.
    With this
    Code:
    this.items[0].icon = '';
    it removes the icon from all the columns...

    How can i access the column for the specific row that matches the condition??

  2. I've solved it:


    Code:
    renderer: function (val, metadata, record) {
                        if (record.raw.possibleActions != 2) {
                            this.items[0].icon = '';
                            this.items[0].tooltip = '';
                        } else {
                            this.items[0].icon = 'images/edit.png';
                            this.items[0].tooltip = 'RELATÓRIO FINAL';
                        }
    
    
                        metadata.style = 'cursor: pointer;';
                        return val;
                    },
    It seems that renderer overwrites the initial configuration and that was why all record had no icons.

  3. #2
    Sencha User
    Join Date
    Jul 2012
    Posts
    25
    Answers
    6
    Vote Rating
    0
    Mteixeira is on a distinguished road

      0  

    Default


    I've solved it:


    Code:
    renderer: function (val, metadata, record) {
                        if (record.raw.possibleActions != 2) {
                            this.items[0].icon = '';
                            this.items[0].tooltip = '';
                        } else {
                            this.items[0].icon = 'images/edit.png';
                            this.items[0].tooltip = 'RELATÓRIO FINAL';
                        }
    
    
                        metadata.style = 'cursor: pointer;';
                        return val;
                    },
    It seems that renderer overwrites the initial configuration and that was why all record had no icons.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi