Results 1 to 3 of 3

Thread: Some weird things with grid )

  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Moscow
    Posts
    137

    Default Some weird things with grid )

    Making this kind of grid :

    Code:
    var store = new Ext.data.GroupingStore({autoLoad:true,
        proxy: new Ext.data.ScriptTagProxy({
            url:'Service/GridData.aspx?sGridName=Reference&action=GetItems'
           }),
           reader: new Ext.data.JsonReader({id:'id', root:'Root', totalProperty:'totalCount',
              fields: [{name:'id'}, {name:'sCaption'}, {name:'sName'}]
           }),
           remoteSort: true
        });
    
    var cm = new Ext.grid.ColumnModel([
    {header:'Идентификатор', dataIndex:'id',width:100, hidden:false},
    {header:'Заголовок', dataIndex:'sCaption',width:100, hidden:false},
    {header:'Имя справочника', dataIndex:'sName',width:100, hidden:false}
    ]);
    cm.defaultSortable = true;
    
    var component = new Ext.grid.GridPanel({
      loadMask:true,  header: false,
      iconCls:'icon-grid',   width: 100,
      height: 100,   autoHeight: true,
      anchor:'100%',   store: store,
      cm: cm,  collapsed:false, collapsible:true,
      animCollapse:true, stripeRows: true,
      title:'Справочник справочников',
      viewConfig: { forceFit:false }
    });
    Data sent to it is (got it from firebug):

    ({"Root": [{"id":"89eb6e91-7d08-4f4b-a4d7-065edb5409c5","sCaption":"Dictionary","sName":"ReferenceField"},{"id":"09339acb-d09e-4e88-8433-da8b234de4c2","sCaption":"Dictionary","sName":"Reference"}], "totalCount":2})

    But the grid doesn't load anything... Can someone help? Grid shows, starts loading, but stops...

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    This is NOT the correct response for a ScriptTagProxy. Try using a HttpProxy instead.

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Moscow
    Posts
    137

    Default

    Thanx a lot )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •