How to add records in json-store

后端 未结 3 642
野的像风
野的像风 2021-02-01 09:24
var store = new Ext.data.JsonStore({
    id:\'jfields\',
    totalProperty:\'totalcount\',
    root:\'rows\',
    url: \'data.php\',  
    fields:[{ name:\'jfields\' },
         


        
3条回答
  •  温柔的废话
    2021-02-01 09:47

    See the recordType property in the JsonStore. It's a function that can be used as a record constructor for the store in question. Use it like this:

    var newRecord = new myStore.recordType(recordData, recordId);
    myStore.add(newRecord);
    

提交回复
热议问题