easyui-datagrid

来源:互联网 发布:增值税开票软件安装 编辑:程序博客网 时间:2024/05/24 03:20
<%@ page language="java" contentType="text/html; charset=UTF-8"    pageEncoding="UTF-8"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>demo-accordion-tools</title><link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css"><link rel="stylesheet" type="text/css" href="../../themes/icon.css"><link rel="stylesheet" type="text/css" href="../demo.css"><script type="text/javascript" src="../../js/jquery.min.js"></script><script type="text/javascript" src="../../js/jquery.easyui.min.js"></script></head><body> <div titl="tools" class="easyui-accordion" style="width:500px;height:300px;"><div title="关于" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">                 this is a tools jsp page        </div>        <div title="DataGrid" style="padding:10px" data-options="selected:true,tools:[{iconCls:'icon-reload',handler:function(){ $('#dg').datagrid('reload');}}]"><!-- 如下的data-options返回的json格式 --><table id="dg" class="easyui-datagrid" data-options="url:'datagrid_data1.json',method:'get',fit:true,fitColumns:true,singleSelect:true"><thead><tr><th data-options="field:'itemid',width:80">Item ID</th><th data-options="field:'productid',width:100">Product ID</th><th data-options="field:'listprice',width:80,align:'right'">List Price</th><th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th><th data-options="field:'attr1',width:150">Attribute</th><th data-options="field:'status',width:50,align:'center'">Status</th></tr></thead></table></div>              </div>   </body></html>