<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="../../Client/Ext/resources/css/ext-all.css" />
<script type="text/javas
<script type="text/javas
</head>
<body>
<script language=javas
Ext.on
Ext.QuickTips.init();
var xg = Ext.grid;
var reader = new Ext.da
{name: 'company'},
{name: 'price', type: 'float'},
{name: 'change', type: 'float'},
{name: 'pctChange', type: 'float'},
{name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'},
{name: 'industry'},
{name: 'desc'}
]);
Ext.grid.dummyData = [
['3m Co',71.72,0.02,0.03,'9/1 12:00am', 'Manufacturing'],
['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am', 'Manufacturing'],
['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am', 'Manufacturing'],
['American Express Company',52.55,0.01,0.02,'9/1 12:00am', 'Finance'],
['American International Group, Inc.',64.13,0.31,0.49,'9/1 12:00am', 'Services'],
['AT&T Inc.',31.61,-0.48,-1.54,'9/1 12:00am', 'Services'],
['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am', 'Manufacturing'],
['Caterpillar Inc.',67.27,0.92,1.39,'9/1 12:00am', 'Services'],
['Citigroup, Inc.',49.37,0.02,0.04,'9/1 12:00am', 'Finance'],
['Walt Disney Company (The) (Holding Company)',29.89,0.24,0.81,'9/1 12:00am', 'Services']
];
var sm = new xg.CheckboxSelectionModel();
var tb3 = new Ext.Toolbar({
items: [
'->',
{
text: 'Button'
},'-',
{
xtype: 'splitbutton',
text: 'Split Button'
},
{
xtype: 'textfield',
name: 'field1',
emptyText: 'enter search term'
},
'-'
]
});
var tb4=new Ext.Toolbar({
items:[
"->","-"
,{
text:"添加",
tooltip:"添加新信息",
iconCls:"addicon"
},"","-",{
text:"编辑",
tooltip:"编辑信息",
iconCls:"editicon"
},"","-",{
text:"删除",
tooltip:"删除信息",
iconCls:"deleteicon"
},"","-",{
text:"查看",
tooltip:"查看信息",
iconCls:"lookicon"
},"","-"
]
});
var grid3 = new xg.GridPanel({
store: new Ext.da
reader: reader,
da
}),
cm: new xg.ColumnModel({
defaults: {
width: 120,
sortable: true
},
columns: [
sm,
{id:'company',header: "Company", width: 200, dataIndex: 'company'},
{header: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
{header: "Change", dataIndex: 'change'},
{header: "% Change", dataIndex: 'pctChange'},
{header: "Last Updated", width: 135, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
]
}),
sm: sm,
columnLines: true,
width:600,
height:300,
frame:true,
title:'测试',
iconCls:'icon-grid',
renderTo: document.body,
items:[tb3,tb4]
});
});
</script>
</body>
</html>