iteye_8232 2009-10-13 09:53
浏览 180
已采纳

EXT 分页

实现EXT分页的功能 现在又这句话{proxy:new Ext.data.HttpProxy({url:'bbar.jsp'}) 但是不知道该加在哪个位置 我把代码贴一下 大家帮看下 呵呵 谢谢啦
Ext.onReady(
function aaa(){
var storee=new Ext.data.SimpleStore({data:datee,fields:["lmbh","ljbh","ljmc","beizhu","lookBi","update","delete"]});//转换成EXT支持的数据类型
[color=red]var grid = new Ext.grid.GridPanel({ //创建一个表格[/color]renderTo:"hello",
title:"广西门户项目BI管理模块",
height:1230,
width:1030,

[color=red]bbar:new Ext.PagingToolbar({
pageSize:15,
store:storee,
displayInfo:true,
displayMsg:'显示第{0}条到第{1}条记录,一共两条',
emptyMsg:"没有记录"
}),[/color]

viewConfig:{forceFit:true},
columns:[

{header:"栏目编号",dataIndex:"lmbh",sortable:true},
{header:"链接编号",dataIndex:"ljbh",sortable:true},
{header:"链接名称",dataIndex:"ljmc"},
{header:"备注",dataIndex:"beizhu"},
{header:"查看BI",dataIndex:"lookBi",renderer:lookBi},
{header:"修改",dataIndex:"update"},
{header:"删除",dataIndex:"delete"}],
store:storee,

autoExpandColumn:3

});

storee.load(params:{start:0,limit:10}});

});

  • 写回答

3条回答 默认 最新

  • JimJin 2009-10-13 10:09
    关注
    // create the Data Store
    var store = new Ext.data.[color=red]JsonStore[/color]({
        root: 'topics',
        totalProperty: 'totalCount',
        idProperty: 'threadid',
        remoteSort: true,
    
        fields: [
            'title', 'forumtitle', 'forumid', 'author',
            {name: 'replycount', type: 'int'},
            {name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
            'lastposter', 'excerpt'
        ],
    
        // load using script tags for cross domain, if the data in on the same domain as
        // this page, an HttpProxy would be better
        [color=red]proxy[/color]: new Ext.data.ScriptTagProxy({
            url: 'http://extjs.com/forum/topics-browse-remote.php'
        })
    });
    store.setDefaultSort('lastpost', 'desc');
    

    store 不能是 SimpleStore
    要像上面这样的远程Store
    在服务器端 bbar.jsp 做分页并传回JSON

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥50 易语言把MYSQL数据库中的数据添加至组合框
  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况