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
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);