jquery easyui 动态绑定数据列
function doSearch2() {
var strsql = $('#sssql').val();
$.ajax({
url: "../HttpHandler/DownloadHandler.ashx?action=StatDownLoadHHH&searchStrSql=" + encodeURI(strsql),
type: "POST",
error: function () {
$.messager.alert('错误', '操作失败!', 'error');
},
success: function (result) {
var result = eval('(' + result + ')');
//$('#tt').html(result.hmnr);
$('#tt').datagrid(result.columns);
}
});
// $('#tt').datagrid({
// columns: [[
// { field: 'itemid', title: 'Item ID', width: 80 },
// { field: 'productid', title: 'Product ID', width: 80 }
// ]],
// data: [
// { itemid: '张三', productid: '1' },
// { itemid: '李四', productid: '2' }
// ]
// });
// $('#tt').datagrid({
// data: [
// { itemid: '张三', productid: '1' },
// { itemid: '李四', productid: '2' }
// ]
// });
// $('#tt').datagrid('insertRow', {
// index: 1,
// row:{
// itemid:'fsfsdfs',
// productid:'KKKKKKPPoo'
// }
// });
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>软件管理</title>
<link rel="stylesheet" type="text/css" href="../easyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../easyui/themes/icon.css" />
<script type="text/javascript" src="../easyui/jquery.min.js"></script>
<script type="text/javascript" src="../easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../easyui/locale/easyui-lang-zh_CN.js"></script>
<script src="DownloadRecordsStat.js" type="text/javascript"></script>
</head>
<body>
<div id="toolbar" style="height:100px">
<input id="sssql" class="easyui-textbox" data-options="multiline:true" value="select * from DOWNLOAD"
style="width:90%;height:100px" ></input>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch2()">查询</a>
</div>
<!-- <table id="dg"title="定性指标基础信息" class="easyui-datagrid"style="width:900px; height: 400px; padding-left: 200px;
pagination="true" rownumbers="true"fitcolumns="true"singleselect="true">
<thead>
<tr>
<th field ="firstname"width="50">定性指标级别</th>
<th field ="lastname"width="50">分数</th>
</tr>
</thead>
<tbody>
<tr>
<td>优秀</td>
<td>100</td>
</tr>
<tr>
<td>良好</td>
<td>80</td>
</tr>
<tr>
<td>一般</td>
<td>60</td>
</tr>
<tr>
<td>较差</td>
<td>50</td>
</tr>
</tbody>
</table> -->
<div id = "servicediv" style="width:100%;height:350px; overflow-y: auto">
<!--<table id="dgtbl" style="width:100%;height:450px" >
</table>-->
<table id="tt" title="Frozen Columns" class="easyui-datagrid" style="width:550px;height:250px"
singleSelect="true" iconCls="icon-save">
</table>
</div>
</body>
</html>
jquery easyui 动态绑定数据列的更多相关文章
- 扩充 jQuery EasyUI Datagrid 数据行鼠标悬停/离开事件(onMouseOver/onMouseOut)
客户需求: jQuery EasyUI Datagrid 用户列表鼠标悬停/离开数据行时显示人员头像(onMouseOver/onMouseOut) 如图所示,Datagrid 鼠标悬停/离开数据行时 ...
- 扩展 jQuery EasyUI Datagrid 数据行鼠标悬停/离开事件(onMouseOver/onMouseOut)
客户需求: jQuery EasyUI Datagrid 用户列表鼠标悬停/离开数据行时显示人员头像(onMouseOver/onMouseOut) 如图所示,Datagrid 鼠标悬停/离开数据行时 ...
- 跨域WebApi的Jquery EasyUI的数据交互
目录 1 大概思路... 1 2 创建WebAPI 1 3 创建CrossMainController并编写... 1 4 Nuget安装microso ...
- 套用JQuery EasyUI列表显示数据、分页、查询
声明,本博客从csdn搬到cnblogs博客园了,以前的csdn不再更新,朋友们可以到这儿来找我的文章,更多的文章会发表,谢谢关注! 有时候闲的无聊,看到extjs那么肥大,真想把自己的项目改了,最近 ...
- ASP.NET网站权限设计实现(三)——套用JQuery EasyUI列表显示数据、分页、查询
一.说明: JQuery EasyUI下载地址:http://jquery-easyui.wikidot.com/download,最新版本1.2.2. 首先预览一下界面: 本例实现的功能: 1.多标 ...
- jquery easyui DataGrid 数据表格 属性
用法 1. <table id="tt"></table> 1. $('#tt').datagrid({ 2. url:'datagrid_d ...
- jquery easyui datagrid数据自动换行 panel用法
nowrap:false 初始化panel $('#txtLeftPercent').panel({ title: '剩余权重:' + percent, height: 10, width: 180, ...
- JQuery EasyUI之DataGrid列名和数据列分别设置不同对齐方式(转)
需求如下 现有数据列三列 Name,Age,CreateDate 数据 张三,18,2000-12-09 :12:34:56 李四,28,2000-12-09 :12:34:56 王麻子,38,200 ...
- 浅谈jQuery easyui datagrid操作单元格样式
今天项目上遇到问题,就是表格风格统一的问题,由于用了2个不同的框架,所以如果要大修比较麻烦,考虑到修改表格样式工作量会少很多,所以考虑修改jQuery easyui datagrid数据网格的样式. ...
随机推荐
- BZOJ 2081: [Poi2010]Beads
Description 问把n截成每个长度后不同子串个数. Sol 调和极数+Hash. 首先这是一个式子 \(n\sum_{i=1}^n \frac {1}{i}\) . 这东西就是调和极数再乘上 ...
- proj.4 线程安全
proj.4 线程安全 本文翻译自proj.4开发者文档 原文链接 http://proj4.org/development/threads.html 线程安全关键问题 全局变量pj_error是在线 ...
- python基础七
subprocess subprocess是专门用来替代os.system;os.spawn更加的先进. 但是subprocess.run()是在python3.5之后才出现的 实例 >> ...
- Linux下的压缩和解压缩命令——gzip/gunzip
gzip命令 gzip命令用来压缩文件.gzip是个使用广泛的压缩程序,文件经它压缩过后,其名称后面会多处".gz"扩展名. gzip是在Linux系统中经常使用的一个对文件进行压 ...
- hibernate整合spring事务异常
Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushM ...
- 【日记】搭建一个node本地服务器
用node搭建一个本地http服务器.首先了解htpp服务器原理 HTTP协议定义Web客户端如何从Web服务器请求Web页面,以及服务器如何把Web页面传送给客户端.HTTP协议采用了请求/响应模型 ...
- python 装饰器
#!/usr/bin/env python3 #-*-encoding:utf-8-*- def w3(*args, **kwargs): ') def w1(): def ww1(func): de ...
- MVC Code First 当实体类发生变化时,如何自动更新数据库表
下面做一个例子,Category是用户新建的一个实体类,然后添加一个字段,然后让数据库中的Category表也添加一个字段 1.Category.cs
- eclipse工具常用快捷键总结
1. ctrl + shift + r 可以根据类名快速找到你所需要的类名称 2. ctrl + shift + i debug的时候可以查看代码的值 3. ctrl + shift + f ...
- linux学习日记之鸟哥
2016年10月11日星期二 df命令解释:用于显示磁盘分区上可以使用的磁盘空间.默认显示单位为KB,可以用该命令来获取硬盘被占用了多少空间,目前还剩多少空间等信息.用法:df 选项 参数例:df – ...