var store = new Ext.data.JsonStore({
root: 'details',
fields: ['a1','a2','a3','a4','a5','a6','a7'],
pruneModifiedRecords:true,
autoload: false
});
var gridDetail = new Ext.grid.Panel({
title: 'Details',
store: store,
width : '100%',
header: {
titleAlign: 'center'
},
columns: [
{ text: 'col1', dataIndex: 'a1' },
{ text: 'col2', dataIndex: 'a2'},
{ text: 'col3', dataIndex: 'a3' },
{ text: 'col4', dataIndex: 'a4' },
{ text: 'col5', dataIndex: 'a5' },
{ text: 'col6', dataIndex: 'a6' },
{ text: 'col7', dataIndex: 'a7' },
],
});
These are my configures about store and grid. I load the data via an ajax request;
var getInfo= function (s1,s2,s3){
gridDetail.mask('Loading');
Ext.Ajax.request({
url : '../project/getInfo.ajax',
params :{
s1: s1,
s2: s2,
s3: s3
},
callback: function(options, success, response){
if(success){
var resp = Ext.decode(response.responseText);
gridDetail.unmask();
//some other codes not related grid
store.loadData(resp,false);
} else {
gridDetail.unmask();
Alert(resp.msj);
}
}
});
and my return JSON is ;
{"success":true,"first":[{...},],"details":[{"a1":"d1","a2":"d2",..."a7":"d7"}]}
But after all this nothing shown on grid, and no error returns. Everything is okay but nothing happen in grid. Mask shown and then unshown but no data shown on grid.
What is my problem, i can't see it? Can anybody help me?