Может кто-нибудь объяснить мне, почему это не работает?Никаких ошибок.
Ext.onReady(function () {
//Ext.Msg.alert('Status', 'Changes saved successfully.');
Ext.define('Bond', {
extend: 'Ext.data.Model',
fields: ['CUSIP', 'DESCRIPTION', 'COUPONRATE', 'ASKPRICE']
});
var store = new Ext.data.Store({
model: 'Bond',
proxy: {
type: 'ajax',
url: 'http://localhost:3197/Home/GetSecondaryOfferings',
reader: {
type: 'json',
root: 'items',
totalProperty: 'totalCount'
}
}
});
store.load();
var grid = new Ext.grid.GridPanel({
store: store,
columns: [
{ header: 'CUSIP', dataIndex: 'CUSIP' },
{ header: 'Description', dataIndex: 'DESCRIPTION', width: 100 },
{ header: 'COUPONRATE', dataIndex: 'COUPONRATE', width: 100 },
{ header: 'ASKPRICE', dataIndex: 'ASKPRICE', width: 100 }
],
renderTo: 'example-grid',
width: 1000,
autoHeight: true,
title: 'JSON SIMPLE 2'
}).render();
});
Вот как выглядит мой объект JSON:
{"totalCount":3316,"items":[{"CUSIP":"989701AL1","DESCRIPTION":"ZIONS BANCORPORATIONSB NT 5.65000% 05/15/2014","COUPONRATE":" 5.650","ASKPRICE":" 104.450"}]}
Сетка просто не заполняется, и я вижу, что JSON возвращается мне с сервера.
Мысли?