unhappy_vapor:
私は、グリッド列に次のJSONレスポンスを表示しようとしています。
{"day":8,"month":7,"changehistory":8,"expire":"120"}
私は以下のように私のモデルを設計しています
...
extend: 'Ext.data.Model',
fields: [{
name: 'day', type: 'int'
}, {
name: 'month', type: 'int'
}, {
name: 'changehistory', type:'string'
}, {
name: 'expire', type:'int'
}]
...
私は以下のようにこのモデルを使用して店舗を持っています
model: 'expiration model',
proxy: {
type: 'ajax',
useDefaultXhrHeader: false,
actionMethods: { read: "POST" },
limitParam: false,
startParam: false,
pageParam: false,
url: UrlManager.buildURL(expiration_get),
reader: {
type: 'json'
}
}
そして、私のグリッドは次のようになります
columns: [
{
dataIndex: 'day',
header: 'day' ,
flex: 1,
align: 'right',
minWidth: 125
}, {
dataIndex: 'month',
header: 'month',
flex: 1,
align: 'right',
minWidth: 125
}, {
dataIndex: 'changehistory',
header: 'changehistory',
flex: 1,
align: 'right',
minWidth: 125
}, {
dataIndex: 'expire',
header: 'expire',
flex: 1,
align: 'right',
minWidth: 125
}]
しかし現在、グリッドは、それぞれの値を持つ4つの列が表示されています。私は、次の形式で情報を表示します: