如题:

datagrid中,见官方文档:

formatter function The cell formatter function, take three parameter:
value: the field value.
rowData: the row record data.
rowIndex: the row index.
undefined

例子:

{field:'id',title:'id',width:100,align:'center',formatter:function(value, row, index){
return '<span style="color;red" >' + value + row.id + index + '</span>';
}}

treegrid中,继承了这个属性,但是有些变化,官方文档没有说明,总结了一下

formatter function The cell formatter function, take two parameter:
value: the field value.//这个照旧
rowData: the row record data.//貌似还加了_parentId,status属性(值为open|close)
rowIndex: the row index.//注意,这个末有了!
undefined

检验代码:

{field:'id',title:'id',width:100,align:'center',formatter:function(value, row, index){
  var xs = [];for (var p in row) {xs.push(p + ":=" + row[p]);}alert(xs.join('\n'));  return '<span style="color;red" >' + value + row.id + index + '</span>';

}}

jQuery EasyUI, datagrid, treegrid formatter 参数比较 row index的更多相关文章

  1. easyui中在formatter: function (value, row,index) {中添加删除方法

    { field : 'abj', title : '操作', align : 'center', resizable:false, width:'10%', formatter: function ( ...

  2. 扩展jquery easyui datagrid编辑单元格

    扩展jquery easyui datagrid编辑单元格 1.随便聊聊 这段时间由于工作上的业务需求,对jquery easyui比较感兴趣,根据比较浅薄的js知识,对jquery easyui中的 ...

  3. 第二百二十八节,jQuery EasyUI,TreeGrid(树形表格)组件

    jQuery EasyUI,TreeGrid(树形表格)组件 学习要点: 1.加载方式 2.属性列表 3.事件列表 4.方法列表 本节课重点了解 EasyUI 中 TreeGrid(树形表格)组件的使 ...

  4. jQuery easyuI datagrid 多行编辑

    在easyUI 动态绑定部分数据后,需要有部分列可以修改,研究了一天终于搞定.这是小弟的做法,望各位有好招的大侠指点. 1.添加jQuery 和jQuery easyuI的引用. 2.添加id为tt的 ...

  5. jQuery EasyUI DataGrid Checkbox 数据设定与取值

    纯粹做个记录,以免日后忘记该怎么设定. 这一篇将会说明两种使用 jQuery EasyUI DataGrid 的 Checkbox 设定方式,以及在既有数据下将 checked 为 true 的该笔数 ...

  6. jquery easyui datagrid使用参考

    jquery easyui datagrid使用参考   创建datagrid 在页面上添加一个div或table标签,然后用jquery获取这个标签,并初始化一个datagrid.代码如下: 页面上 ...

  7. Jquery easyui datagrid 导出Excel

    From:http://www.cnblogs.com/weiqt/articles/4022399.html datagrid的扩展方法,用于将当前的数据生成excel需要的内容. 1 <sc ...

  8. Jquery EasyUI中treegrid

    Jquery EasyUI中treegrid的中右键菜单和一般按钮同时绑定事件时的怪异事件 InChatter系统开源聊天模块前奏曲   最近在研究WCF,又因为工作中的项目需要,要为现有的系统增加一 ...

  9. jquery easyui datagrid 加每页合计和总合计

    jquery easyui datagrid 加每页合计和总合计 一:效果图 二:代码实现 这个只有从后台来处理 后台根据rows 和page两个参数返回的datatable 命名为dt 然后根据dt ...

随机推荐

  1. jsp空页面导致的jvm heap溢出

    为了性能测试需要,写一个了简单的jsp页面: <%@ page contentType="text/html;charset=UTF-8" language="ja ...

  2. HLS协议实现

    http://blog.csdn.net/wutong_login/article/details/9673255

  3. 一个CLI的 的例子

    1)这是CLI 调用HTTPOST例子 #using <System.dll> using namespace System;using namespace System::Net;usi ...

  4. ANDROID_MARS学习笔记_S01原始版_023_MP3PLAYER003_播放mp3

    一.简介 1.在onListItemClick中实现点击条目时,跳转到PlayerActivity,mp3info通过Intent传给PlayerActivity 2.PlayerActivity通过 ...

  5. QT带OpenGL与不带的区别,QT5是一个伟大的框架,短时期内根本不会有替代者

    你好 , 我Qt的初学者 , 我在官网下载Qt时感觉很迷茫 , 不知道要下载哪个, 麻烦你写他们之间的不同点:Qt 5.2.0 for Windows 32-bit (MinGW 4.8, OpenG ...

  6. MySQL性能调优与架构设计-架构篇

    架构篇(1) 读书笔记 1.Scale(扩展):从数据库来看,就是让数据库能够提供更强的服务能力 ScaleOut: 是通过增加处理节点的方式来提高整体处理能力 ScaleUp: 是通过增加当前处理节 ...

  7. Android ServiceConnection

    绑定到一个Service 应用组件(客户端)可以调用bindService()绑定到一个service.Android系统之后调用service的onBind()方法,它返回一个用来与service交 ...

  8. Oracle建表插数据等等

    Oracle的表的管理: 表名和列的命名规则,详见 数据库命名规范 . 必须以字母开头 . 长度不能超过30个字符 . 不能使用Oracle的保留字 . 只能使用如下字符 column_name-Z, ...

  9. Eclipse问题解决方案,不断更新

    执行“software update”时出现:Error retrieving "feature.xml"... 执行“software update”时出现:Error retr ...

  10. spring的事件机制

    事件机制作为一种编程机制,在许多语言中都提供了支持.JAVA语言也不例外,java中的事件机制的参与者有3种角色: 1.event object 2.event source 3.event list ...