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 动态绑定数据列的更多相关文章

  1. 扩充 jQuery EasyUI Datagrid 数据行鼠标悬停/离开事件(onMouseOver/onMouseOut)

    客户需求: jQuery EasyUI Datagrid 用户列表鼠标悬停/离开数据行时显示人员头像(onMouseOver/onMouseOut) 如图所示,Datagrid 鼠标悬停/离开数据行时 ...

  2. 扩展 jQuery EasyUI Datagrid 数据行鼠标悬停/离开事件(onMouseOver/onMouseOut)

    客户需求: jQuery EasyUI Datagrid 用户列表鼠标悬停/离开数据行时显示人员头像(onMouseOver/onMouseOut) 如图所示,Datagrid 鼠标悬停/离开数据行时 ...

  3. 跨域WebApi的Jquery EasyUI的数据交互

    目录 1       大概思路... 1 2       创建WebAPI 1 3       创建CrossMainController并编写... 1 4       Nuget安装microso ...

  4. 套用JQuery EasyUI列表显示数据、分页、查询

    声明,本博客从csdn搬到cnblogs博客园了,以前的csdn不再更新,朋友们可以到这儿来找我的文章,更多的文章会发表,谢谢关注! 有时候闲的无聊,看到extjs那么肥大,真想把自己的项目改了,最近 ...

  5. ASP.NET网站权限设计实现(三)——套用JQuery EasyUI列表显示数据、分页、查询

    一.说明: JQuery EasyUI下载地址:http://jquery-easyui.wikidot.com/download,最新版本1.2.2. 首先预览一下界面: 本例实现的功能: 1.多标 ...

  6. jquery easyui DataGrid 数据表格 属性

    用法 1.  <table id="tt"></table> 1.  $('#tt').datagrid({ 2.      url:'datagrid_d ...

  7. jquery easyui datagrid数据自动换行 panel用法

    nowrap:false 初始化panel $('#txtLeftPercent').panel({ title: '剩余权重:' + percent, height: 10, width: 180, ...

  8. JQuery EasyUI之DataGrid列名和数据列分别设置不同对齐方式(转)

    需求如下 现有数据列三列 Name,Age,CreateDate 数据 张三,18,2000-12-09 :12:34:56 李四,28,2000-12-09 :12:34:56 王麻子,38,200 ...

  9. 浅谈jQuery easyui datagrid操作单元格样式

    今天项目上遇到问题,就是表格风格统一的问题,由于用了2个不同的框架,所以如果要大修比较麻烦,考虑到修改表格样式工作量会少很多,所以考虑修改jQuery easyui datagrid数据网格的样式. ...

随机推荐

  1. 6 VC维

    1 VC维的定义 VC维其实就是第一个break point的之前的样本容量.标准定义是:对一个假设空间,如果存在N个样本能够被假设空间中的h按所有可能的2的N次方种形式分开,则称该假设空间能够把N个 ...

  2. Springboot快速入门创建

    maven构建项目 1.访问http://start.spring.io/,进入快速创建工程的主页 可参考下图所示: 2.选择构建工具Maven Project.Spring Boot版本1.3.6以 ...

  3. FreeCodeCamp心得

    <img>    <input>  tags are self-closing. So that there is only one tag without a slash i ...

  4. html5 Application Cache 机制以及使用

    那什么是Application Cache呢? 顾名思义,AppCache就是对app内存缓存的方案,具体表现为当请求某个文件时不是从网络获取该文件,而是从本地内存中获取. Application C ...

  5. vmware 下centos7配置网络

    步骤一: 虚拟机中的网络设置配置为桥接模式: 步骤二: 注:本人配置的为非静态IP,ip为自动获取 vi /etc/sysconfig/network-scripts/ifcfg-eth0 配置内容如 ...

  6. iOS 自动追加版本时间版本号脚本

    buildNumber=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "${PROJECT_DIR}/${I ...

  7. Centos YUM 升级PHP

    升级到5.3.3 1.删除已安装文件  yum remove php-*   2.安装 PHP 5.3   yum -y install php53*     升级到5.6   1.删除已安装文件   ...

  8. SQL注入以及如何防止和索引

    SQL注入产生的原因:程序开发过程中不注意规范书写sql语句和对特殊字符进行过滤,导致客户端可以通过全局变量POST和GET提交一些sql语句正常执行. 防止SQL注入: 1.开启配置文件中的magi ...

  9. IP地址,子网掩码,默认网关,DNS服务器知识详解(转)

    转自:http://www.cnblogs.com/JuneWang/p/3917697.html 为了更深入的学习TCP/IP协议,最近看了不少有关资料,收集整理记录如下,以备后面的使用和方便各位学 ...

  10. 清理C盘系统垃圾文件-批处理方式

    很多时候安装软件越来越多,部分软件产生的临时文件.垃圾文件常常存在于C盘系统盘中:日积夜累直接导致可用的系统盘空间越来越小,直到没有多余的空间为止, 最后可能的结果是系统异常.软件无法正常运行:此时可 ...