如何在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');
}
}
});
});
Run Code Online (Sandbox Code Playgroud)
我的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>
Run Code Online (Sandbox Code Playgroud)
在那个对话框中我也需要发送这些名称......但是这种方法不会从我选择将其发送到服务器的网格中给出我的名字.
我对多选行为的期望是,只要没有按下特殊键,就会表现得正常.我的意思是,如果您选择了一行并单击另一行而没有按下其他键,则应选择新行并取消选择旧行.那么,jqGrid的标准选项允许您在常规行为之间进行选择,或者总是多选.只有在按下特殊键时才能进行多重选择.
有没有办法实现这个目标?