1. #11
    Sencha User
    Join Date
    Feb 2012
    Posts
    10
    Vote Rating
    0
    dhilchrist is on a distinguished road

      0  

    Default


    how can I store this store.filterby in store.on(load) to another store, causing problem with Plugin:[filterRow]

  2. #12
    Sencha User
    Join Date
    Feb 2010
    Posts
    34
    Vote Rating
    0
    umit is on a distinguished road

      0  

    Default


    sorry i dont know what you exactly mean.
    you can add the records from the store to another one with newstore.add(store.getRange(0,store.getCount()-1));

    But I dont know what you exactly need and want to do

  3. #13
    Sencha User
    Join Date
    Feb 2012
    Posts
    10
    Vote Rating
    0
    dhilchrist is on a distinguished road

      0  

    Default


    I have some filter plugin in the header of the Grid, so when try filter rows from plugin in the head, it is getting records from the actual store.
    so i need to store this store.filterby values to another store display that in the grid.
    I tried like thie following but it is stores only the first page to the new store.
    -----------
    var store = new Ext.data.XmlStore({
    autoDestroy: true,
    storeId: 'myStore',
    proxy: proxy,
    root : "standard",
    record: 'standardData',
    idPath: 'rowId',
    totalProperty: '@totalCount',
    pageSize: 20,
    autoLoad:{params:{start:0, limit:20}},
    paramNames: {
    start: 'startRow',
    limit: 'recordSize'
    },
    fields: fieldObjectList
    });


    var store2 = new Ext.data.XmlStore({
    recordType: store.recordType
    });
    /* create the grid */
    var grid = new Ext.grid.GridPanel({
    store : store2,
    columns : displayList,
    renderTo : '#divName#',
    width : "100%",
    height : 300,
    //plugins: [filterRow],
    stripeRows: true,
    layout : 'fit',
    viewConfig : {
    forceFit : true
    },
    bbar: [new Ext.PagingToolbar({
    pageSize: 20,
    store: store2,
    displayInfo: true,
    displayMsg: 'Displaying topics {0} - {1} of {2}',
    emptyMsg: "No topics to display",
    params:{
    startRow: 0,
    recordSize: 20
    }
    })]
    });




    store.on("load",function(){
    var addedRunIds=[]; var records = [];
    store.filterBy(function(rec){
    if(addedRunIds.indexOf(rec.get("TESJobRunID"))==-1){//does not contain it
    //so add it and show it
    addedRunIds.push(rec.get("TESJobRunID"));
    records.push(rec.copy());
    return true;
    }
    return false;
    });
    store2.add(records);


    });
    ------------------

Similar Threads

  1. count distinct for a particular column
    By emmas in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 23 Aug 2010, 1:26 PM
  2. Editable Grid with All ComboBoxes, and Distinct values?
    By jwong in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 9 Dec 2009, 3:52 AM
  3. How to specify jsonData as option in store.load()?
    By dbassett74 in forum Ext 3.x: Help & Discussion
    Replies: 9
    Last Post: 16 Jul 2009, 5:34 PM
  4. Editable Grid with All ComboBoxes, and Distinct values?
    By jwong in forum Ext GWT: Help & Discussion (1.x)
    Replies: 4
    Last Post: 19 Jun 2008, 2:16 PM
  5. how to distinct editorGrid's cellclick from celldblclick
    By lixiaoxu85 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 28 Apr 2008, 7:13 PM

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar