Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    40
    Vote Rating
    1
    baven is on a distinguished road

      0  

    Default Help needed for EXTJS GRID REFRESH DATA - using Ext.data.PagingMemoryProxy

    Help needed for EXTJS GRID REFRESH DATA - using Ext.data.PagingMemoryProxy


    This is the method to refresh the grid data after getting the response from the server.. but it is not refreshing the grid with the new data eventhough the alert(..) msg prints the new data... I need some help here. It always shows the new data first time, but after that it is always showing the older ones eventhough server returns the new data.

    fileDataStore.load({params:{start:0, limit:50}}); is not refreshing the grid

    fileDataStore.load(); //refreshes the grid, but the first page shows record range as 1-300 eventhough we have 50 per page setup in the datastore-reader config.

    I use Ext.data.PagingMemoryProxy here. Is there any other Proxy to use for this?

    Code:
    fileUploadForm.getForm().submit({
          url: readURL,
          timeout : 600000,
          params: {properFileName:pfileName},
          waitMsg: 'Parsing and validating the file..this may take few minutes..',
          success: function(form, action) {
                obj = Ext.util.JSON.decode(action.response.responseText);
                alert("creating new proxy for data "+Ext.util.JSON.encode(obj));
                fileDataStore.proxy = new Ext.data.PagingMemoryProxy(obj);
                fileDataStore.load({params:{start:0, limit:50}});    
               grid.getView().refresh();       },
           failure: function(form, action) {
                 fileDataStore.removeAll();
            }
    });
    //DATASTORE
    Code:
    var fileDataStore = new Ext.ux.data.PagingStore( {
        reader : new Ext.data.JsonReader( {
             id: 'myId',
             root:'dtoList',
             totalProperty:'totalCount',
             successProperty : 'success',
             messageProperty : 'message',
            fields:[ 
                 {name: 'field1'},
                 {name: 'field2'},
                   .....
             ],
             params : {
                 start : 0,
                 limit : 50
             }
        }),
        listeners : {
             'load': function(thisStore, records, options) {
              ........
              .......
             }
         }
    });
    Code:
    grid = new Ext.extend(Ext.grid.GridPanel,{
        store: fileDataStore,
         .....

  2. #2
    Sencha User
    Join Date
    Jun 2010
    Posts
    40
    Vote Rating
    1
    baven is on a distinguished road

      0  

    Default


    I just added these :

    fileDataStore.proxy = new Ext.data.PagingMemoryProxy(obj);
    fileDataStore.load();
    fileDataStore.reload({params:{start:0, limit:50}});

    and it worked fine.