Bonjour,

Je suis entrain d'utiliser EXTJS v4 pour la réalisation de quelques interfaces riches, le souci c'est que je rencontre des difficultés de temps à autre (chose tout à fait normale pour un débutant en EXTjs :p), le problème que je rencontre en ce moment et au niveau de la pagination, en fait sur ma page j'ai tout les enregistrements qui sont affichés, même après avoir spécifié le nbr d'item par pages, si possible de m'aider et merci d'avance

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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', header: 'NOM_VAR' },
		            { dataIndex: 'SURF_PG', header: 'SURF_PG' },
                    { dataIndex: 'DD_CYCLE_PROD', header: 'DD_CYCLE_PROD' }
		        ],
        renderTo: 'panel',
        title: 'Dvpt Grid',
        width: 570,
        height: 350,
        dockedItems: [{
            xtype: 'pagingtoolbar',
            store: store,
            dock: 'bottom',
            displayInfo: true
        }]
    });
}