1. #1
    Sencha User env0ke's Avatar
    Join Date
    Apr 2011
    Posts
    57
    Answers
    2
    Vote Rating
    1
    env0ke is on a distinguished road

      0  

    Default Answered: Reverse numbering for rownumberer

    Answered: Reverse numbering for rownumberer


    Hi all,

    How i can do reverse numbering for rownumberer?

  2. Quote Originally Posted by env0ke View Post
    Hi all,

    How i can do reverse numbering for rownumberer?
    Try defining:

    Code:
    Ext.define('Ext.ux.grid.ReverseRowNumberer', {
        extend: 'Ext.grid.RowNumberer',
        alias: 'widget.reverserownumberer',
    
    
        renderer: function(value, metaData, record, rowIdx, colIdx, store) {
            if (this.rowspan){
                metaData.cellAttr = 'rowspan="'+this.rowspan+'"';
            }
    
    
            metaData.tdCls = Ext.baseCSSPrefix + 'grid-cell-special';
    
            // reverse the direction of the returned row number by subtracting it off the total
            return store.totalCount - store.indexOfTotal(record) + 1;
        }
    });
    and use xtype: 'reverserownumberer' for your row numberer column.

    hope this gets you started.

    stevil

  3. #2
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045
    Answers
    15
    Vote Rating
    9
    stevil will become famous soon enough

      0  

    Default


    Quote Originally Posted by env0ke View Post
    Hi all,

    How i can do reverse numbering for rownumberer?
    Try defining:

    Code:
    Ext.define('Ext.ux.grid.ReverseRowNumberer', {
        extend: 'Ext.grid.RowNumberer',
        alias: 'widget.reverserownumberer',
    
    
        renderer: function(value, metaData, record, rowIdx, colIdx, store) {
            if (this.rowspan){
                metaData.cellAttr = 'rowspan="'+this.rowspan+'"';
            }
    
    
            metaData.tdCls = Ext.baseCSSPrefix + 'grid-cell-special';
    
            // reverse the direction of the returned row number by subtracting it off the total
            return store.totalCount - store.indexOfTotal(record) + 1;
        }
    });
    and use xtype: 'reverserownumberer' for your row numberer column.

    hope this gets you started.

    stevil

  4. #3
    Sencha User env0ke's Avatar
    Join Date
    Apr 2011
    Posts
    57
    Answers
    2
    Vote Rating
    1
    env0ke is on a distinguished road

      0  

    Thumbs up


    Worked for me. Thanks!

Thread Participants: 1

Tags for this Thread

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..."