小编Oth*_*man的帖子

PagingToolbar Extjs 4的问题

我正在使用ExtJS v4制作一些丰富的界面,问题是我经常遇到困难(对于Extjs中的初学者来说非常正常:p),我现在遇到的问题,关注分页,实际上是我的页面我有显示的所有记录,即使在通过页面nbr指定项目后,如果可能的话可以帮助我

Ext.onReady(onReady);

function onReady() {
    var itemsPerPage = 10;
    var store = new Ext.data.JsonStore({
        autoLoad: false,
        pageSize: itemsPerPage,
        proxy: new Ext.data.HttpProxy({
            type: 'ajax',
            url: '../Service.asmx/GetMyDvpt',
            reader: {
                type: 'json',
                root: 'd',
                //totalProperty: 'total',
                idProperty: 'Id'
            },
            headers: {
                'Content-type': 'application/json'
            }
        }),
        fields: ['NOM_EXP', 'NOM_ESP', 'NOM_VAR', 'SURF_PG', 'DD_CYCLE_PROD']
   });

   store.load({
        params: {
            start: 0,
            limit: itemsPerPage
       }
   });

   Ext.create('Ext.grid.Panel', {
        store: store,
        columns: [
            { dataIndex: 'NOM_EXP', header: 'NOM_EXP' },
            { dataIndex: 'NOM_ESP', header: 'NOM_ESP' },
            { dataIndex: 'NOM_VAR', …
Run Code Online (Sandbox Code Playgroud)

paging json extjs4

1
推荐指数
1
解决办法
8367
查看次数

标签 统计

extjs4 ×1

json ×1

paging ×1