即使我在按钮的 onclick 方法中指定不这样做(onclick='return false;'),我添加到行中的按钮仍然会发回。我想它的网格在做回帖?我正在努力防止回发并显示我自己的自定义弹出表单。
gridComplete: function(){
var ids = $('#jqGridControl1').jqGrid('getDataIDs');
for(var i=0;i < ids.length;i++){
var rowid = ids[i];
de = "<input type='image' title='Delete this record.' src='../images/icn_delete.gif' onclick=' return false;' style='border-width:0px;'/>";
ee = "<input type='image' title='Edit this record.' src='../images/icn_edit.gif' onclick=' return false;' style='border-width:0px;' />";
ve = "<input type='image' title='View related information.' src='../images/house.gif' onclick='return false;' style='border-width:0px;' />";
pe = "<input type='image' title='Print' src='../images/icn_printer.gif' onclick=' return false;' style='border-width:0px;' />";
je = "<input type='image' title='Appointment' src='../images/icn_journal.gif' onclick=' return false;' style='border-width:0px;' />";
se = "<input type='image' title='Select' src='../images/icn_select.gif' onclick=' return false;' style='border-width:0px;' />";
jQuery('#jqGridControl1').jqGrid('setRowData',ids[i],{act:de+ee+ve+pe+je+se});
}