How to retrieve JSON Data Array from ExtJS Store

后端 未结 15 2172
忘掉有多难
忘掉有多难 2020-12-04 17:04

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         


        
15条回答
  •  情书的邮戳
    2020-12-04 17:30

    I always use store.proxy.reader.jsonData or store.proxy.reader.rawData

    For example - this return the items nested into a root node called 'data':

    var some_store = Ext.data.StoreManager.lookup('some_store_id');
    Ext.each(some_store.proxy.reader.rawData.data, function(obj, i){
       console.info(obj);
    });
    

    This only works immediately after a store read-operation (while not been manipulated yet).

提交回复
热议问题