日期:2014-05-16 浏览次数:20359 次
success: function(response){
var rs = Ext.JSON.decode(response.responseText);
Ext.Msg.alert("按钮", rs.data);
// process server response here
var store = new Ext.data.Store({
data:rs.data,
fields:['provider','location','currency'
,'startnum1','startunit1','endnum1','endunit1','price1','priceunit1'
,'startnum2','startunit2','endnum2','endunit2','price2','priceunit2'
,'startnum3','startunit3','endnum3','endunit3','price3','priceunit3']
});
console.info(rs);
this.getSGrid().reconfigure(store);
console.info(this.getSGrid().store.data);
//看到store有很多条记录但都是空的
}
{
xtype:'grid',
id:'sgrid',
store:{
fields: ['provider','location','currency'
,'startnum1','startunit1','endnum1','endunit1','price1','priceunit1'
,'startnum2','startunit2','endnum2','endunit2','price2','priceunit2'
,'startnum3','startunit3','endnum3','endunit3','price3','priceunit3']
},
title: "search result",
width: 1000,
autoHeight: true,
columns:[
{text: "provider", width: 80, dataIndex: "provider", tooltip: "provider"},
{text: "location", width: 80, dataIndex: "location", align: "center"},
{text: "currency", width: 50, dataIndex: "currency"},
{text: "startnum1", width: 50, dataIndex: "startnum1", align: "center"},