daragrid 简单认识
2024-09-06 06:24:25
@{
ViewBag.Title = "EasyUI";
Layout = null;
}
<script src="~/jquery-easyui-1.5.5.2/jquery.min.js"></script>
<script src="~/jquery-easyui-1.5.5.2/jquery.easyui.min.js"></script>
<script src="~/jquery-easyui-1.5.5.2/locale/easyui-lang-zh_CN.js"></script>
<link href="~/jquery-easyui-1.5.5.2/themes/default/easyui.css" rel="stylesheet" />
<link href="~/jquery-easyui-1.5.5.2/themes/icon.css" rel="stylesheet" />
<h2>EasyUI</h2>
<div>
<!--DataGrid-->
<div style="margin:20px">
<table class="easyui-datagrid" fitColumns="true" rownumbers="true" singleSelect="true" title="第一个Datagrid" style="width:300px;height:auto">
<thead>
<tr>
<th align="center" width="100px" data-options="field:'Name'">姓名</th>
<th align="center" width="100px" data-options="field:'Age'">年龄</th>
<th align="center" width="100px" data-options="field:'Work'">工作</th>
</tr>
</thead>
<tbody>
<tr>
<td>张三</td>
<td>11</td>
<td>C#</td>
</tr>
<tr>
<td>李四</td>
<td>11</td>
<td>java</td>
</tr>
<tr>
<td>王五</td>
<td>11</td>
<td>php</td>
</tr>
</tbody>
</table>
</div>
</div>
第二种写法(js):
$('#dg').datagrid({
url:'datagrid_data.json',
columns:[[
{field:'code',title:'Code',width:100},
{field:'name',title:'Name',width:100},
{field:'price',title:'Price',width:100,align:'right'}
]]
});
最新文章
- 日常积累之JSON.stringify和JSON.parse substr
- Oracle Redo Log 机制 小结(转载)
- c++ 私有函数 头文件设计
- 小波变换和motion信号处理(二)(转)
- 导入表 IMPORT_DESCRIPTOR
- hdu3849-By Recognizing These Guys, We Find Social Networks Useful:双连通分量
- 谁能告诉我为什么sum_area输出总是0(多边形重心问题)
- android压缩解压zip文件
- 对eigrp默认网络的理解!
- 201521123114 《Java程序设计》第11周学习总结
- 【vue】函数式组件
- 网络流问题 P2763 试题库问题
- step_by_step_记录deepin下curl安装过程
- python高级-面向对象(11)
- Linux电源管理(7)_Wakeup events framework【转】
- Maven的assembly插件实现自定义打包部署(包含依赖jar包)
- 使用Pyspark进行特征工程时的那些坑
- python正则表达式二[转]
- IOS tableview 横向滚动
- CRF 及CRF++ 安装与解释