首页 > 其他 > 详细

行添加操作列

时间:2014-11-01 17:46:07      阅读:317      评论:0      收藏:0      [点我收藏+]

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

 

行添加操作列

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!