How to add records in json-store

后端 未结 3 688
野的像风
野的像风 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:29

    I have also figured out a simple solution to this:

    listeners: {
        load: function( xstore ,  record , option ) {
            var u = new xstore.recordType({  jfields : 'monthly'  });
            xstore.insert(record.length, u);
        }
    }
    

    Here what I have to add is this listeners as when the data loads it will create the record type and u can add fields as data as many as u want

提交回复
热议问题