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数据网格的样式. ...
随机推荐
- Uiautomator--Uiselector元素定位
一.UiSelector作用 按照一定的条件(例如控件的text值,资源id),定位界面上的元素.UiSelector对象的最终目的是去构造一个UiObject对象. 二.元素定位 1.根据text定 ...
- 关于display:none 和visibility:hidden 的区别
1.占据空间 :none 隐藏后不占据空间 visibility占据空间 2.回流与渲染:none产生回流与渲染 ? 可以通过oprea中的Profiler 工具测试. 关于回流的详细介绍:http: ...
- CC2540自己的配置文件
首先要指出,字段属性有notify的不能同时有read,write属性,别问哥,哥也不知道,反正我做的就不能notify,只能read,write. 分享的程序段第一字段有notify属性,第二字段r ...
- js获取系统时间时自动补齐日期带零
最近在开发中发现有日期不规范的问题,正常规则应该是yy-mm-dd,而在输出时候却变成yy-mm-d,这是js的date()方法在作怪 解决思路是若在10号前,则自动给它补齐一个0,下面给出解决方法, ...
- vim 命令
命令历史 以:和/开头的命令都有历史纪录,可以首先键入:或/然后按上下箭头来选择某个历史命令. 启动vim 在命令行窗口中输入以下命令即可 vim 直接启动vim vim filename 打开vim ...
- tp框架实现ajax
不墨迹,直接进主题. tp框架实现ajax 首先,我们先做一个testajax.html用来显示页面(只是一个简单的下拉列表^_^) <!DOCTYPE html PUBLIC "-/ ...
- squid 2.7 通过域名反向代理多个服务器的配置方法
详细配置及注释如下,供大家学习参考. visible_hostname squid1.abc.com #设定squid的主机名,如无此项squid将无法启动 http_port 80 accel vh ...
- UML大战需求分析——阅读笔记03
读<UML大战需求分析>有感03 状态机图和活动图在样子比较相似,但状态机图是用来为对象的状态及造成状态改变的事件建模.我们大二学习UML统一建模语言状态机图模块时了解到,UML的状态机图 ...
- EditView 输入限制(软键盘限制)
众所周知EditView有个inputType 属性可以设置输入的类型. 如下设置,则只能输入数字: android:inputType="number" 但是有时候需要自定义输入 ...
- 搜索引擎广告过滤Chrome插件
搜索广告屏蔽Chrome插件:自动过滤:百度,360,搜狗,google,bing的搜索广告,让魏则西的悲剧不再重演.珍爱生命,远离搜索广告! 下载:FuckAd.zip 安装:方法自行百度. 关闭百 ...