1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    6
    Vote Rating
    0
    brondsem is on a distinguished road

      0  

    Default Grid: Post column name (not just id) in remote sort

    Grid: Post column name (not just id) in remote sort


    In a grid, if you're doing remote paging and sorting, the POSTs only contain the column ID of the sortColumn. Here's how you can add the column name to the POST parameters (until grid 2.0 comes out which sounds like it'll have better column name support):

    Code:
    dataModel.createParams_original = dataModel.createParams;
    dataModel.createParams = function(pageNum, sortColumn, sortDir){
        params = dataModel.createParams_original(pageNum, sortColumn, sortDir);
        params['sortColumnName'] = dataModel.schema.fields[sortColumn];
        return params;
    };

  2. #2
    Ext Premium Member BernardChhun's Avatar
    Join Date
    Mar 2007
    Location
    Quebec, Canada
    Posts
    831
    Vote Rating
    2
    BernardChhun will become famous soon enough

      0  

    Default


    this works really well. thanks

  3. #3
    Ext JS Premium Member prophet's Avatar
    Join Date
    Mar 2007
    Location
    Greenwich, CT
    Posts
    187
    Vote Rating
    0
    prophet is on a distinguished road

      0  

    Default


    I made this work with the XMLDataModel by changing :
    Code:
    params['sortColumnName'] = dataModel.schema.fields[sortColumn];
    To this:
    Code:
    params['sortColumnName'] = dataModel.getFieldName(sortColumn);
    It should also be noted that I'm using the yui-ext.0.40-alpha release.

Similar Threads

  1. Send sort column number in paged grid in Ext 1.0
    By JeffHowden in forum Community Discussion
    Replies: 3
    Last Post: 2 Jun 2008, 11:16 AM
  2. column sort makes ajax call for each time grid was recreated
    By lemontree in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 4 Jul 2007, 2:14 AM
  3. Grid: smart remote vs local sort
    By brondsem in forum Community Discussion
    Replies: 0
    Last Post: 26 Jan 2007, 7:19 AM
  4. grid sort marks all rows by the first column
    By lsmith in forum Ext 1.x: Help & Discussion
    Replies: 8
    Last Post: 22 Nov 2006, 9:13 AM
  5. Grid Sort for formatted date column in FF vs IE6
    By mrim in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 31 Oct 2006, 8:28 PM

Thread Participants: 2

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