View Full Version : GridPanel in a Window with an ArrayStore not rendering any data

14 Aug 2015, 6:34 AM
I'm trying to put a GridPanel powered by an ArrayStore in a Window, but no matter what I do, it just looks like this with no data rows inside:
http://i.stack.imgur.com/l5u0l.png (http://i.stack.imgur.com/l5u0l.png)
Here's my code:

var ticketsStore = new Ext.data.ArrayStore ( { autoDestroy: false, remoteSort: false, data: result, fields: [ { name: 'articleId', type: 'int' }, { name: 'heatTicketRef', type: 'string' }, { name: 'username', type: 'string' }, { name: 'dateLinked', type: 'date' } ] } ); var ticketsGrid = new Ext.grid.GridPanel({ store: ticketsStore, id: this.id + 'ticketsGrid', viewConfig: { emptyText: 'No data' }, autoShow: true, idProperty: 'heatTicketRef', columns: [ { id: 'heatTicketRef', header:"Ticket ID", width: 100, dataIndex: 'heatTicketRef', sortable: false }, { header: "User", width: 100, dataIndex: 'username', sortable: false }, { header: "Date Linked", width: 100, dataIndex: 'dateLinked', xtype: 'datecolumn', format: 'j M Y h:ia', sortable: false } ] }); var window = new Ext.Window ( { renderTo: Ext.getBody(), id: this.id + 'linkedHeatTickets', closable: true, modal: true, autoHeight: true, width: 500, title:'Linked Heat Tickets', resizable: false, listeners: { close: function () { // do something } }, items: { style: 'padding:5px;', items: ticketsGrid }, buttons: { text: 'Close', handler: function () { window.close(); } } } ); window.show();When I debug, I can see that my "result" object is healthy and the ArrayStore is of the right length: http://i.stack.imgur.com/YVkTP.png (http://i.stack.imgur.com/YVkTP.png)
But the GridPanel doesn't like the data because it's not in its items (although it's in the store) array:
http://i.stack.imgur.com/rpA93.png (http://i.stack.imgur.com/rpA93.png)
What little thing have I done wrong?

17 Aug 2015, 9:11 PM
Perhaps it's not properly reading your data? I created a sample data set that shows:sbd