1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    171
    Vote Rating
    0
    samarth is on a distinguished road

      0  

    Default problem in sorting grid items

    problem in sorting grid items


    Hi folks,
    I am using ExtJS 3.4. I have a grid items in which during login time i am fetching from master table after login i am feting from another table and 2 items from master table. i have refresh button in this after login when i clicked refresh button i sorting will get problem and at the first master table data will come and after that another temp table datas will come. i have used

    Code:
    {
          header : 'items1',
          dataIndex : 'items1',
          sortable:true,
          renderer: function(value, metaData, record, rowIndex, colIndex, store)
          { 
                 return '<a href="#">' + value +'</a>'; 
          }
    }
    when refresh button is clicked then items must be sort as it came before. How to do this? that datas won't get changed but only the items in the grid will change I have used sortable true also. Please help me in this issue
    Samarth Manjunath

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi

    if you are using jsonstore look that http://docs.sencha.com/ext-js/3-4/#!...cfg-remoteSort

    Regards
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    171
    Vote Rating
    0
    samarth is on a distinguished road

      0  

    Default


    Quote Originally Posted by sword-it View Post
    Hi

    if you are using jsonstore look that http://docs.sencha.com/ext-js/3-4/#!...cfg-remoteSort

    Regards
    Hi sword-it,
    thanks for your quick reply i using Ext.data.Store and for reader: new Ext.data.JsonReader and in this type:'json' i have used. I didn't used json store
    Samarth Manjunath

  4. #4
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi

    Data.Store also have same properties and methods please look api

    Regards
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    171
    Vote Rating
    0
    samarth is on a distinguished road

      0  

    Default


    Quote Originally Posted by sword-it View Post
    Hi

    Data.Store also have same properties and methods please look api

    Regards
    Hi sword-it
    i got solution store.setDefaultSort('items1', 'desc'). Thanks for your reply
    Samarth Manjunath