Ext.onReady(function(){
Ext.QuickTips.init();
// var sm = new Ext.grid.CheckboxSelectionModel();
var cm = new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer(),
{header:'id',dataIndex:'id',sortable:true},
{header:'nam',dataIndex:'nam'},
{header:'cod',dataIndex:'cod'}
]);
//proxyֱ��ȥ��ȡjosn���
var ds=new Ext.data.Store({
proxy:new Ext.data.HttpProxy({url:'gridjson.jsp'}),
reader:new Ext.data.JsonReader({
totalcounts:'totalcounts',
root:'root'
},[
{name:'id'},
{name:'nam'},
{name:'cod'}
])
});
var grid = new Ext.grid.GridPanel({
el: grid3,
ds: ds,
cm: cm,
width:700,
height:280,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: ds,
displayInfo: true,
displayMsg: 'display {0} of {1} record,total {2} ',
emptyMsg: "no record"
})
});
//el:ָ��htmlԪ��������ʾgrid
grid.render();//��Ⱦ���
ds.load({params:{start:0, limit:10}});
});