How to retrieve JSON Data Array from ExtJS Store

后端 未结 15 2136
忘掉有多难
忘掉有多难 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

    If you want to get the data exactly like what you get by Writer (for example ignoring fields with persist:false config), use the following code (Note: I tested it in Ext 5.1)

      var arr = [];   
    
        this.store.each(function (record) {
            arr.push(this.store.getProxy().getWriter().getRecordData(record))
        });  
    

提交回复
热议问题