我想在編輯/添加模式下將多個複選框添加到列。現在這個列有一個啓用了多個選項的選擇框。我想用複選框列表或單選按鈕列表替換它jqGrid如何將多個複選框添加到列
我的想法是:用戶應該能夠通過選中特定單元格中列出的複選框來選擇相關選項(在添加或編輯模式下:一致)。保存行後,只應顯示選定的用戶選項(不帶複選框)。
下面是我爲特定列選擇框代碼片段:
{
name: 'RoomTypes', index: 'RoomTypes', width: 300, editable: true, edittype: 'select',
editoptions: {
value: roomTypesFormatterEdit,
custom_element: function (value, options) {
return $.jgrid.createEl.call(this, "select",
$.extend(true, {}, options, { custom_element: null, custom_value: null }),
value);
},
custom_value: function ($elem, operation, value) {
if (operation === "get") {
return $elem.val();
}
},
multiple: true
},
align: 'left', formatter: roomTypesFormatter
},
如果酒店房間的名稱將在選擇框中顯示的「roomTypesFormatterEdit」返回列表。
此外,我想重新安排行的編輯(編輯模式)的高度以適合的複選框的高度或顯示在選擇框中的所有項目
請幫助 謝謝大家
感謝您的回覆Oleg。我會試試這個,讓你知道狀態! – gamini2006
@ gamini2006:不客氣! – Oleg
它很棒!你的男人奧列格,再次感謝.... – gamini2006