Hybrid View

  1. #1
    Sencha User Baron89's Avatar
    Join Date
    Aug 2012
    Posts
    58
    Vote Rating
    0
    Baron89 is on a distinguished road

      0  

    Default grid panel sort listener

    grid panel sort listener


    Hi all,
    is there a listener that listen to grid panel column sorting?
    i tried to use sortchange() like below, but seems not working?
    Code:
    var cm = new Ext.grid.ColumnModel([
     {
       header: '',
      width: 100,
      dataIndex: 'op',
      sortable: true, 
       hidden:true,
       listener:{
           sortchange : function(){alert("");}
       }
     }
    ])

  2. #2
    Sencha User
    Join Date
    Jan 2011
    Posts
    544
    Vote Rating
    52
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      1  

    Default


    You need to add the sortChange listener to the grid, not the column
    http://docs.sencha.com/ext-js/3-4/#!...ent-sortchange

  3. #3
    Sencha User Baron89's Avatar
    Join Date
    Aug 2012
    Posts
    58
    Vote Rating
    0
    Baron89 is on a distinguished road

      0  

    Default


    Quote Originally Posted by willigogs View Post
    You need to add the sortChange listener to the grid, not the column
    http://docs.sencha.com/ext-js/3-4/#!...ent-sortchange
    may i know how?

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    544
    Vote Rating
    52
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      1  

    Default


    Code:
    var grid = new Ext.grid.GridPanel({
        // GRID CONFIG OPTIONS
        listeners: {
            sortchange: function(thisGrid, sortinfo) {
                console.log(thisGrid, sortinfo)
                alert('Sort has been clicked!')    
            }
        }
    });

  5. #5
    Sencha User Baron89's Avatar
    Join Date
    Aug 2012
    Posts
    58
    Vote Rating
    0
    Baron89 is on a distinguished road

      0  

    Default


    Quote Originally Posted by willigogs View Post
    Code:
    var grid = new Ext.grid.GridPanel({
        // GRID CONFIG OPTIONS
        listeners: {
            sortchange: function(thisGrid, sortinfo) {
                console.log(thisGrid, sortinfo)
                alert('Sort has been clicked!')    
            }
        }
    });
    that listener get fired when the page just loaded. and not being called when we click 'sort'

  6. #6
    Sencha User
    Join Date
    Jan 2011
    Posts
    544
    Vote Rating
    52
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      1  

    Default


    Can you share how you have implemented the code?

    Here's a working example with the exact same code as posted above:
    http://jsfiddle.net/Whinters/C5ctN/

Thread Participants: 1

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