1. #1
    Sencha User
    Join Date
    Aug 2015
    Posts
    1
    Vote Rating
    0
    lilalfyalien is on a distinguished road

      0  

    Default GridPanel in a Window with an ArrayStore not rendering any data

    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:

    Here's my code:

    var ticketsStore =newExt.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 =newExt.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 =newExt.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:
    But the GridPanel doesn't like the data because it's not in its items (although it's in the store) array:

    What little thing have I done wrong?
    Thanks!

  2. #2
    Sencha - Support Team tristan.lee's Avatar
    Join Date
    Mar 2015
    Posts
    749
    Vote Rating
    39
    tristan.lee has a spectacular aura about tristan.lee has a spectacular aura about tristan.lee has a spectacular aura about

      0  

    Default

    Perhaps it's not properly reading your data? I created a sample data set that shows:
    Tristan Lee
    Sencha Inc - Support Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [­FIDDLE] id [­/FIDDLE]

Similar Threads

  1. ArrayStore reader doesn't read data from URL OR Rendering issue
    By coooolmagic in forum Ext: Discussion
    Replies: 2
    Last Post: 8 Jul 2011, 2:28 PM
  2. Replies: 0
    Last Post: 16 Feb 2011, 8:15 AM
  3. Gridpanel won't show data after rendering
    By rencarl in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 22 Dec 2008, 2:04 AM
  4. [2.0??] GridPanel not rendering data rows in IE6
    By asmdec in forum Ext 2.x: Bugs
    Replies: 2
    Last Post: 5 Mar 2008, 4:34 AM

Thread Participants: 1

Tags for this Thread