kendo ui之grid列表
2024-08-27 07:59:06
1.test_grid.jsp
<html>
<head>
<%@ include file="/WEB-INF/jsp/common/top.jsp"%>
<meta http-equiv="Content-Type" content="text/html;">
<link href="<%=path%>/staticresources/css/test/test_grid.css" rel="stylesheet">
<script type="text/javascript" src="<%=path%>/staticresource/js/test/test_grid.js"></script>
</head>
<body>
<div id="grid"></div>
</body>
</html>
2.test_grid.js$(document).ready(function() {rgs=$("#target").val();
createGrid(args);
});
function createGrid(value){
var dataSource=new kendo.data.DataSource({
transport:{
read:{
type:"post",
url: path+"^_^";
contentType:"application/json;"
dataType:"json"
},
parameterMap:function(options,operation){
if(operation=="read"){
if(value!='null'&&value!=undefined&&value!='')
options['^*^']=value;
}
return json.stringify(options);
}
},
pagesize:^_^,
schema:{
data : function(d) {
return d.data;
},
total : function(d) {
return d.total;
},
model : {
id : "id",
fields : {
text : {
type : "string"
}
}
}
},
serverPaging:true,
serverFiltering:false,
serverSorting:false,
change:function(){
(#_#);
}
}); $("#grid").kendoGrid({
dataSource : dataSource,
sortable : true,
selectable : "row",
change : function() {
(#_#);
},
pageable : {
refresh : true,
pageSizes : true
},
columns : [{
hidden : true,
field : "id",
title : "id",
},{
field : "text",
title : text,
}],
toolbar : [ {
template : kendo.template($("#toolBarTemplate").html())
} ],
cancel : function(e) {
e.preventDefault();
}
});
}
最新文章
- YY一下微信线下支付的场景
- Eclipse下FatJar插件的安装与使用
- android通过BitmapFactory.decodeFile获取图片bitmap报内存溢出的解决办法
- PHP 时间 date,strtotime ,time计算1970开始的第几天
- p7 struct and union
- 用户管理 之 Linux 用户(User)查询篇
- js中的执行上下文,菜鸟入门基础。
- [ruby on rails] 跟我学之(2)HelloWorld
- STM32canopen调试
- WordPress使用360CDN替换google服务,解决WordPress打开速度变慢问题
- .net组件技术
- 第六篇、CSS属性
- winform DataGridView 导出到Excel表格 分类: WinForm 2014-07-04 10:48 177人阅读 评论(0) 收藏
- JavaScript 原型链的一点想法
- BadgeView使用介绍
- 伙伴系统之伙伴系统概述--Linux内存管理(十五)
- SAS 循环与数组
- 第28月第23天 lineFragmentPadding
- 解决 windows下安装Anaconda后python pip不可用的情况
- 集大软件工程15级个人作业Week1