用法
步骤 1:创建一个 HTML 页面
- <head>
- <script type="text/javascript" src="datagrid-detailview.js"></script>
- </head>
- <body>
- <table id="tt"></table>
- </body>
步骤 2:创建数据网格(DataGrid)
- $('#tt').datagrid({
- title:'DataGrid - DetailView',
- width:500,
- height:250,
- remoteSort:false,
- singleSelect:true,
- nowrap:false,
- fitColumns:true,
- url:'datagrid_data.json',
- columns:[[
- {
field:'itemid',title:'Item ID',width:80},
- {
field:'productid',title:'Product ID',width:100,sortable:true},
- {
field:'listprice',title:'List Price',width:80,align:'right',sortable:true},
- {
field:'unitcost',title:'Unit Cost',width:80,align:'right',sortable:true},
- {
field:'attr1',title:'Attribute',width:150,sortable:true},
- {
field:'status',title:'Status',</