I am trying out a few things in ExtJS including displaying a grid with different functionalities.
In my page, I first declare a Javascript Array of about a hundred data which I store in a variable called myArray
Then, I do the following:
Ext.define('Fund2',{
extend:'Ext.data.Model',
fields:[{name:'Id'},
{name:'Id2'},
{name:'Name'},
{name:'Name2'},
{name:'Name3'},
{name:'Name4'},
{name:'Param1'},
{name:'Param2'},
{name:'Param3'}]
});
var myStore2=Ext.create('Ext.data.ArrayStore',{
model:'Fund2',
data:myArray,
pageSize:10
});
Ext.create('Ext.grid.Panel',{
renderTo:'div2',
store:myStore2,
height:500,
width:500,
columns:[{text:'Id',dataIndex:'Id'},
{text:'Name',dataIndex:'Name'},
{text:'Additional',dataIndex:'Param1'}],
dockedItems:[{
xtype: 'pagingtoolbar',
store:myStore2,
dock: 'bottom',
displayInfo: true
}]
});
On th page, the grid panel is displayed properly and filled with the data.
The paging toolbar is also available and computes the right amount of pages.
However, the data is not "paged"; all the records are shown in the grid.
Do you know where I made a mistake?