Ext中的Grid例子 href="../AllRes/resources/css/ext-all.css"/>
<script> <BR>//ID排序 <BR>Ext.onReady(function(){ <BR>var cm = new Ext.grid.ColumnModel([ <BR>{header:'编号',dataIndex:'id',sortable:true}, <BR>{header:'名称',dataIndex:'name'}, <BR>{header:'描述',dataIndex:'descn'} <BR>]) ; <BR>var data = [ <BR>['1','name1','descn1'], <BR>['2','name2','descn2'], <BR>['3','name3','descn3'], <BR>['4','name4','descn4'], <BR>['5','name3','descn5'] <BR>] ; <BR>var ds = new Ext.data.Store({ <BR>proxy:new Ext.data.MemoryProxy(data), <BR>reader:new Ext.data.ArrayReader({},[ <BR>{name: 'id'}, <BR>{name: 'name'}, <BR>{name: 'descn'} <BR>]) <BR>}) ; <BR>ds.load() ; <br><br>var grid = new Ext.grid.GridPanel({ <BR>el:'grid', <BR>ds: ds, <BR>cm: cm <BR>}) ; <BR>grid.render() ; <BR>}) ; <BR></script>