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();
}
});
}

最新文章

  1. YY一下微信线下支付的场景
  2. Eclipse下FatJar插件的安装与使用
  3. android通过BitmapFactory.decodeFile获取图片bitmap报内存溢出的解决办法
  4. PHP 时间 date,strtotime ,time计算1970开始的第几天
  5. p7 struct and union
  6. 用户管理 之 Linux 用户(User)查询篇
  7. js中的执行上下文,菜鸟入门基础。
  8. [ruby on rails] 跟我学之(2)HelloWorld
  9. STM32canopen调试
  10. WordPress使用360CDN替换google服务,解决WordPress打开速度变慢问题
  11. .net组件技术
  12. 第六篇、CSS属性
  13. winform DataGridView 导出到Excel表格 分类: WinForm 2014-07-04 10:48 177人阅读 评论(0) 收藏
  14. JavaScript 原型链的一点想法
  15. BadgeView使用介绍
  16. 伙伴系统之伙伴系统概述--Linux内存管理(十五)
  17. SAS 循环与数组
  18. 第28月第23天 lineFragmentPadding
  19. 解决 windows下安装Anaconda后python pip不可用的情况
  20. 集大软件工程15级个人作业Week1

热门文章

  1. css动画属性性能
  2. git入门网站
  3. 什么是UART中的FIFO
  4. MR21、MR22和CK24的区别
  5. 删除Kafka的topic
  6. url的内容及格式
  7. 使用 Sublime Text 2 开发 Unity3D 项目
  8. mysql自增主键归零的方法
  9. Maven中的DependencyManagement和Dependencies
  10. YY前端课程3