Is there a method allowing me to return my stored data in an ExtJS Grid Panel exactly the way I loaded it using:
var data = [\"value1\", \"value2\"]
Store.lo
In my case I wanted a javascript jagged array e.g. [["row1Cell1", "row1cell2"],["row2Cell1", "row2cell2"]] based on the contents of the Ext grid store.
The javascript as below will create such an array, dropping the id key in the object which I didn't need.
var tableDataArray = [];
Ext.ComponentQuery.query('[name="table1"]')[0].store.each(function(record){
var thisRecordArray = [];
for (var key in record.data) {
if (key != 'id') {
thisRecordArray.push(record.data[key]);
}
}
tableDataArray.push(thisRecordArray);
});