extjs4.1 - How to insert records for particular store field in extjs -
i getting month, target, target1 values getting webservice available in store. want calculate total value , insert total field value in same store.
i doing calculation don't know how insert total value total field. can tell me how this?
chartstore.each(function (rec) { total=parsefloat(rec.get('target'))+parsefloat(rec.get('target1')); });
month target target1 total jan 25 25 50 mon 50 50 100
you should use convert function in model total field below
{ name : 'total', convert : function( value, record ) { var totalvalue = record.get('target') + record.get('target1'); return totalvalue; } type: 'number' },
Comments
Post a Comment