如何在 jqGrid 中使用 Jquery 模式确认?说当我提交我的条目时,它会弹出一个模式对话框并显示名称以及发送到服务器的消息。
我的方法
$("#dialog-confirm").dialog({
autoOpen:false,
resizable:false,
height:180,
modal:true,
buttons:{
'Confirm': function(){
var ids =jQuery("#list10").jqGrid('getGridParam','selarrrow');
$.ajax({
type: "POST",
url: "url&names="+ids,
data: JSON.stringify(ids),
dataType: "json"
});
},
'cancel': function(){
$(this).dialog('close');
}
}
});
});
我的 html :
<div id="dialog-confirm" title="Confirm">
<p><span class="ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Are you sure want to cancel(or send this names)#names?</p>
</div>
在该对话框中,我还需要发送这些名称......但是这种方法不会为我提供我选择将其发送到服务器的网格中的名称。