当前位置: 编程技术>jquery
jQuery easyui中DataGrid插件示例
来源: 互联网 发布时间:2014-10-08
本文导语: 先查看jquery easyui中datagrid插件基本界面: 基本用法: 代码示例: Js代码: 代码示例: $('#tt').datagrid({ title:'Column Group', width:560, height:250, url:'datagrid_data.json', columns:[[ ...
先查看jquery easyui中datagrid插件基本界面:
基本用法:
代码示例:
Js代码:
代码示例:
$('#tt').datagrid({
title:'Column Group',
width:560,
height:250,
url:'datagrid_data.json',
columns:[[
{field:'itemid',title:'Item ID',rowspan:2,width:80,sortable:true},
{field:'productid',title:'Product ID',rowspan:2,width:80,sortable:true},
{title:'Item Details',colspan:4}
],[
{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:100},
{field:'status',title:'Status',width:60}
]],
rownumbers:true
});
title:'Column Group',
width:560,
height:250,
url:'datagrid_data.json',
columns:[[
{field:'itemid',title:'Item ID',rowspan:2,width:80,sortable:true},
{field:'productid',title:'Product ID',rowspan:2,width:80,sortable:true},
{title:'Item Details',colspan:4}
],[
{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:100},
{field:'status',title:'Status',width:60}
]],
rownumbers:true
});
参考链接:http://jquery-easyui.wikidot.com/tutorial:datagrid9