日期:2014-05-16 浏览次数:20758 次
Ext.BLANK_IMAGE_URL="../../ext/resources/images/default/s.gif";
Ext.onReady(function(){
var cm = new Ext.grid.ColumnModel([
{header:"id",dataIndex:"id"},
{header:"姓名",dataIndex:"name"},
{header:"email",dataIndex:"email"},
{header:"性别",dataIndex:"sex"},
{header:"年龄",dataIndex:"age"}
]);
var fields = ["id","name","email","sex","age"];
var data = [["1","JIm","cc@msn.com","0","22"],["2","Naha","blue@msn.com","1","23"]];
var store = new Ext.data.SimpleStore({
fields:fields,
data:data
});
var grid = new Ext.grid.GridPanel({
cm:cm,
store:store
});
grid.render(Ext.getBody());
});