I get the JSON response and try to populate data to my grid.
The function takes around 3 sec to finish ( 20 records ) and record is in the browser memory already. I am wondering why it takes so slow.
Code:
for(var i=0;i<record.get("attach").length;i++)
{
var filename = record.get("attach")[i].filename ;
var sender = record.get("attach")[i].From;
var dateformat = new Date();
var edit = '';
var currentdate = record.get("attach")[i].Date;
var myRecord = Ext.create('Myapp.model.DocumentModel', {
File: filename,
From: sender,
Date: currentdate,
Action: edit,
attachId: record.get("attach")[i].attachid,
docId: record.get("attach")[i].docId,
docName:record.get("attach")[i].docName
});
Ext.getCmp('DocUploadGrid').getStore().add( myRecord );
}
Welcome to any suggestion.
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire