1. #1
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default Got DirectStore to run, but how do I get it load into my grid?

    Got DirectStore to run, but how do I get it load into my grid?


    The function runs now, but I don't understand how to get it to load into my grid, which also renders. A break point set in my server code confirms that the function was called, but I don't understand how to setup the grid to load the data after it is returned from the server.
    Code:
    function ForumInit()
    {
      if (typeof(KnowledgeBase.gridForumList) != "undefined") return;
      Ext.select('div[box^=t]').boxWrap();
      gridStore = new Ext.data.DirectStore
      (
          {
              directFn: DirectRequest.GetForumList,
              paramsAsHash: false,
              paramOrder: '', 
              sortInfo: { field: 'ForumName', direction: 'ASC' },
              idProperty: 'ForumID',
              autoLoad: true,
              fields: 
              [
                  {name: 'ForumID', type: 'string'},
                  {name: 'ForumName', type: 'string'},
                  {name: 'CreatedBy', type: 'string'},
                  {name: 'CreatedDate', type: 'date'},
                  {name: 'ForumType', type: 'string'},
                  {name: 'NumberOfPosts', type: 'int'},
                  {name: 'NumberOfThreads', type: 'int'},
                  {name: 'ForumCatId', type: 'int'},
                  {name: 'ModifiedBy', type: 'string'},
                  {name: 'ModifiedDate', type: 'date'}
              ],
              remoteSort: false
          }
      );
      KnowledgeBase.gridForumList = new Ext.grid.GridPanel
      (
          {
              renderTo: 'divForum',
              title: 'Forums',
              frame: true,
              viewConfig: { autoFill: true },
              stripeRows: false,
              scroll: false,
              autoHeight:true,
              autoWidth:true,
              sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
              store: gridStore,
              columns:
              [
                  {header: 'Forum Name', dataIndex: 'ForumName', sortable: true},
                  {header: 'Created By', dataIndex: 'CreatedBy', width:140, 
                    sortable: true},
                  {header: 'Created Date', dataIndex: 'CreatedDate', width: 90, 
                      xtype: 'datecolumn', format: 'M d, Y', sortable: true},
                  {header: 'Type', dataIndex:'ForumType', width:50, sortable: true},
                  {header: 'Posts', dataIndex:'NumberOfPosts', width:50,
                     sortable: true},
                  {header: 'Threads', dataIndex:'NumberOfThreads', width:50, 
                     sortable: true},
                  {header: 'Category', dataIndex:'ForumCatId', width:100, 
                     sortable: true},
                  {header: 'Modified By', dataIndex:'ModifiedBy', width:140, 
                     sortable: true},
                  {header: 'Modified Date', dataIndex:'ModifiedDate', width: 90, 
                      xtype: 'datecolumn', format: 'M d, Y', sortable: true}
              ]
          }
      );
    }
    Last edited by geewhizbang; 31 Jul 2009 at 6:08 AM. Reason: Added emphasis on one line so it could be referenced in solution

  2. #2
    Ext User
    Join Date
    Mar 2009
    Posts
    71
    Vote Rating
    0
    J@y is on a distinguished road

      0  

    Default


    have you checked what is the result returned from the server?

    any screen capture?

  3. #3
    Ext JS Premium Member
    Join Date
    Jul 2009
    Location
    Seattle, Washington USA
    Posts
    200
    Vote Rating
    0
    geewhizbang is on a distinguished road

      0  

    Default


    I posted this in another location and the problem was determined to be the line
    paramOrder: '',

    deleting it fixed the problem.

  4. #4
    Ext User
    Join Date
    Mar 2009
    Posts
    71
    Vote Rating
    0
    J@y is on a distinguished road

      0  

    Default


    Quote Originally Posted by geewhizbang View Post
    I posted this in another location and the problem was determined to be the line
    paramOrder: '',

    deleting it fixed the problem.
    Yup, becoz you don't have any params passed to the server.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi