easyui-datagrid 的loader属性用法
API介绍比较简略:
定义如何从远程服务器加载数据。返回false可以放弃本次请求动作。该函数接受以下参数:
param:参数对象传递给远程服务器。
success(data):当检索数据成功的时候会调用该回调函数。
error():当检索数据失败的时候会调用该回调函数。
搜索了一下,发现多数是配合$.ajax({})使用,且如果$.ajax({})中设置了url,则datagrid的url属性会失效.
示例代码:
<table id="dg" class="easyui-datagrid" title="信息列表" style="width:700px;height:250px"
data-options="loader:myloader",
...(其他属性根据自己需要自己添加)
> <script>
var myloader=function(param,success,error){
$.ajax({
url:"远程调用的服务",
data:{
属性:值 (传入的参数) },
type:"提交方式"(get || post),
dataType:"jsonp"(跨域),
jsonpCallback:"callback",
success: function(data){
var con=data.data.config;
success(con);
}
})
} </script>
<thead>
<tr>
<th data-options="field:'id' ">ID</th>
... ...
</tr>
</thead>
</table>
easyui-datagrid 的loader属性用法的更多相关文章
- EasyUI DataGrid定制默认属性名称
EasyUI DataGrid绑定服务器返回Json数据的解决方案 1. 服务器返回的数据对象格式,及初始化返回值 public class RequestResult { private int c ...
- easyui datagrid中 formatter的用法
1.基本用法 单元格formatter(格式化器)函数,带3个参数: value:字段值. row:行记录数据. index: 行索引. $('#dg').datagrid({ columns:[[ ...
- jquery easyui DataGrid 数据表格 属性
用法 1. <table id="tt"></table> 1. $('#tt').datagrid({ 2. url:'datagrid_d ...
- EasyUI datagrid 改变url属性 实现动态加载数据
$(function () { //说明:btnsearch按钮,selCat下拉列表,ttdatagrid table $("#btnsearch").click(functio ...
- jquery easyui datagrid数据自动换行 panel用法
nowrap:false 初始化panel $('#txtLeftPercent').panel({ title: '剩余权重:' + percent, height: 10, width: 180, ...
- 利用EasyUI 数据网格(DataGrid)的loader属性实现后端分页
该属性在easyui官方文档中并没有详细阐述,通过简单的资料查询和摸索,实现了easyUI数据网格的后端分页功能. 在官网文档中这样阐述loader属性: 定义如何从远程服务器加载数据.返回false ...
- 数据网格和树-EasyUI Datagrid 数据网格、EasyUI Propertygrid 属性网格、EasyUI Tree 树、EasyUI Treegrid 树形网格
EasyUI Datagrid 数据网格 扩展自 $.fn.panel.defaults.通过 $.fn.datagrid.defaults 重写默认的 defaults. 数据网格(datagrid ...
- easyui datagrid 动态添加columns属性
公司在项目设计的时候,有一个需求,就是查出来的表的字段不唯一,一张表的字段可能是三个,也可能是五个,但是却要把它显示到页面,这个给我做ui的带来一点麻烦.因为以前一般用easyui 的datagrid ...
- easyui datagrid 绑定json对象属性的属性
今天用easyui 的datagrid绑定数据时,后台提供的数据是实体类类型的,其中有一个实体类A的属性b是另一个实体类B类型的,而前台需要显示b的属性c,这下就悲剧了,前台没法直接绑定了,后来脑筋一 ...
随机推荐
- codeforces 732
A. Buy a Shovel time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...
- HDU 5015 233 Matrix --矩阵快速幂
题意:给出矩阵的第0行(233,2333,23333,...)和第0列a1,a2,...an(n<=10,m<=10^9),给出式子: A[i][j] = A[i-1][j] + A[i] ...
- 转: 使用Eclipse的Working Set,界面清爽多了
from: http://iyuanbo.iteye.com/blog/1158136 使用Eclipse的Working Set,界面清爽多了 想必大家的Eclipse里也会有这么多得工程... ...
- android ndk 无法找到 so 案例一例
代码如下: public class JNIWrapWorkerThread{ static { System.loadLibrary("libjni_base_fram ...
- FragmentTransaction.replace() 你不知道的坑
一.起源: 先看效果,在linearLayout中添加了4个Fragment,然后点击替换一次确替换了两个Fragment,引发了我的研究兴趣: 第一次启动 ...
- EncryptHelper
public class EncryptHelper { public static string EncryptMd5Str(string str) { MD5 md5Obj = MD5.Creat ...
- php正则表达式治疗结巴
用正则表达式去解决结巴这个问题可以通过下面进行解决: 解决思路是: 先找到重复的不部分 用str_replace($source,$replace,$str);来进行代理 下面分两种情况,最后将这两种 ...
- HTTP 错误 500.22 - Internal Server Error
HTTP 错误 500.22 - Internal Server Error 检测到在集成的托管管道模式下不适用的 ASP.NET 设置. 最可能的原因: 此应用程序在 system.web/http ...
- Linux shell实战(ipcs工具)
#!/bin/bash -o $# -gt ] then echo "参数个数不正确!" exit - fi WHOAIM=`whoami` function release { ...
- JS使构造函数与new操作符无关
function User(name, passwordHash) { this.name = name; this.passwordHash = passwordHash; } 当使用User函数创 ...