我试图在我的 slickgrid 的一列中选择和删除图像,但无法这样做。我了解如何像这样执行单个图像按钮。:
var column = {id:delCol, field:'del', name:'Delete', width:250, formatter:buttonFormatter}
//Now define your buttonFormatter function
function buttonFormatter(row,cell,value,columnDef,dataContext){
var button = "<input class='del' type='button' id='"+ dataContext.id +"' />";
//the id is so that you can identify the row when the particular button is clicked
return button;
//Now the row will display your button
}
关于如何做到这一点的任何想法?