码迷,mamicode.com
首页 > 其他好文 > 详细

行添加操作列

时间:2014-11-01 17:47:25      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:blog   http   io   ar   for   sp   on   2014   log   

rowformater方法可以扩展自定义列:

bubuko.com,布布扣

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

Code example:

$(‘#dg‘).datagrid({
	columns:[[
		{field:‘userId‘,title:‘User‘, width:80,
			formatter: function(value,row,index){
				if (row.user){
					return row.user.name;
				} else {
					return value;
				}
			}
		}
	]]
});

 

行添加操作列

标签:blog   http   io   ar   for   sp   on   2014   log   

原文地址:http://www.cnblogs.com/kedarui/p/4067414.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!