这是 qxgrid 中的自定义按钮列定义
{ text: 'Actions', cellsrenderer: function (row, column, value)
{
var viewType = $("#divManageViewGrid").jqxGrid('getcellvalue', row, 'VIEW_TYPE');
if (viewType == "Shared") {
return '<input type="button" class="button-link" id="btnRemove" value="Remove"/>';
}
return '<input type="button" class="button-link-delete" value="Delete"/>';
}
} column definition
这是仅触发一次的按钮单击事件
$(document).on(‘click’, “.button-link”, function ()
{
//open popup
var row = $(“#divManageViewGrid”).jqxGrid(‘getselectedrowindex’);
id = $(“#divManageViewGrid”).jqxGrid(‘getrowid’, row);
$("#popupWindow").jqxWindow('show');
});
按钮单击事件仅触发一次,即使我使用了“on”,任何人都可以帮助我