[英]jqGrid how to add multiple checkboxes to a column
我想在编辑/添加模式下向列中添加多个复选框。 现在,此列有一个启用了多个选项的选择框。 我想用复选框列表或单选按钮列表替换它
我的想法是:用户应该能够通过选中特定单元格中列出的复选框(添加或编辑模式:内联)来选择所需的相关选项。 保存行后,应仅显示所选的选项用户(不带复选框)。
以下是特定列的选择框的代码段:
{
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”返回将在选择框中显示的酒店房间名称列表。
此外,我想重新安排编辑(编辑模式)行的高度以适应复选框的高度或显示选择框中的所有项目
请帮忙谢谢大家
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.