[英]Dynamically Change Populate Select List after Edit From Displays
我正在使用 jqGrid 4.15.6-pre
我的編輯表單中有一個選擇列表,它根據幾個參數在 onSelect 函數中使用 dataURL 填充。 編輯表單上有一個輸入元素,該元素綁定了一個可以更改參數(customerReturnType)值之一的函數。 我想根據新的參數值以編程方式重新填充選擇列表。
這是我的 onSelect 代碼:
locationCheckOverride = false;
customerReturnLocation = $("#customerReturnqueue").getRowData(id)['crrLocation'];
customerReturnType = $("#customerReturnqueue").getRowData(id)['crrType'];
editModeOverride = $("#customerReturnqueue").getRowData(id)['editModeOverride'];
holdingLocationEditOnly = $("#customerReturnqueue").getRowData(id)['editHoldingLocationOnly'];
$("#customerReturnqueue").setColProp('crrLocation', {
editoptions: {
dataUrl: '/QMSWebApp/CustomerReturnRecordsControllerServletV8?lifecycle=customerReturnLocationOptionsLessInitialized¤tLocation='+customerReturnLocation+'&crrType='+customerReturnType,
selectFilled: function (options) {
$(options.elem).select2({
dropdownCssClass: 'ui-widget ui-jqdialog zclassX2',
width: 300
});
}}});
如果我正確理解了您想要根據更改新值動態更改選擇的問題。
這是 Guriddo jqGrid 中的示例,但它應該在 free-jqgrid 中工作。 這只是一個想法,你可以如何做到這一點。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.