+ -
当前位置:首页 → 问答吧 → Ext4.0 分页问题

Ext4.0 分页问题

时间:2011-09-30

来源:互联网

问题:消息: 缺少 ';'
行: 1
字符: 21
代码: 0
URI: http://localhost:19608/Handler/Login.ashx?action=test&_dc=1317368840890&page=1&start=0&limit=50&sort=lastpost&dir=name&callback=Ext.data.JsonP.callback1



没有返回数据到前台页面??初学,向大家多多学习


JScript code

 var store = Ext.create('Ext.data.Store', {
        pageSize: 50,
        model: 'Employee',
        remoteSort: false,
        proxy: {
            type: 'jsonp',
            url: '../Handler/Login.ashx?action=test',
            reader: {
                root: 'topics',
                totalProperty: 'totalCount'
            },
            simpleSortMode: true
        },
        sorters: [{
            property: 'lastpost',
            direction: 'name'
        }]
    });


store.loadPage(1);


后台:
C# code

private void GetTest()
        {
            HttpContext.Current.Response.ContentType="application/json;charset=UTF-8";
            HttpContext.Current.Response.Write("{totalCount:2,topics:[{name:'abc',email:'add',start:'20110101',salary:222},{name:'abc',email:'add',start:'20110101',salary:222}]}");
            HttpContext.Current.Response.End();
        }

作者: ycw0919   发布时间: 2011-09-30

更正下. sorters: [{
  property: 'name',
  direction: 'DESC'
  }]

作者: ycw0919   发布时间: 2011-09-30

怎么没人回答

作者: ycw0919   发布时间: 2011-09-30

相关阅读 更多

热门下载

更多