formatter datagrid行按钮

1.对应字段上:

,{title : '操作项',field : 'xxx',
   formatter:function (val, row, index) {
   var html = "<a class='loan_ct_view_button' href='#' onclick='submit("+row.id+");'></a>";
    return html;
   }
}
 

 2.加载事件: 

,onLoadSuccess:function(data){ 
$(".loan_ct_view_button").linkbutton({ text:'提交', plain:true, iconCls:'icon-ok' });
 }

 

 

你可能感兴趣的:(datagrid)