0
我需要在我的網格中創建一個自定義按鈕,將打開一個模式,這將根據選定的行呈現選項字段的選項。自定義網格按鈕加載ajax內容取決於選定的行
所以用戶將選擇一行並點擊按鈕。行ID應該作爲URL參數傳遞給我的操作,以便它可以進行查詢並填充選擇字段。
這是我掙扎:
navigatorExtraButtons="{
honorarios:{
title: 'Consultar honorários do processo',
caption: 'H',
icon: 'none',
onclick: function(){
var id = jQuery('#processoTable').jqGrid('getGridParam','selrow');
if (id) {
var ret = jQuery('#processoTable').jqGrid('getRowData',id);
// need to pass ret.nrProcesso as param to the URL that will load content into the modal
} else { alert('Please select a row.');}
}
},
隨着上面的代碼是否可以從選擇的行所希望的ID值。但我不知道如何將它分配給
<s:url... param
和填充模態...預先
感謝。