jQuery jqGrid 编辑表单是否支持多选字段?
我仍在尝试找出是否可以在 jqGrid,当我拉出该行的编辑表单时,我需要一个可以将该列显示为多选列表的 GUI。
这可以是:
- 复选框列表
- 选择带有复选框的列表,以便您可以选择多个。
这在 jqGrid 中可能吗?
I am still trying to find out if I can have a cell in a jqGrid, and when I pull up the edit form for that row, I need a GUI that can display that column as a multiselect list.
This could either be:
- List of checkboxes
- Select List with checkboxes so you can select more than one.
Is this possible in jqGrid?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
jqGrid支持多选编辑。它不使用复选框进行选择,而是使用多选选择元素。我使用双击内联编辑制作了演示。
这是相应的代码:
顺便说一下,在创建 演示 我发现,不能使用具有“0”作为 id 的选择元素,这些元素不是全力支持。例如,“1:sport;2:science”有效,但“0:sport;1:science”无效。在这种情况下,“运动”项目的选择将不会保存。
如果您需要使用更舒适的带有复选框的控件,则必须实现 自定义编辑。
jqGrid supports multiselect editing. It uses no ceckboxes for selection, but multiselect select element. I made the demo using inline editing on double-click.
Here is the corresponding code:
By the way during creating the demo I find out, that one can't use select elements having "0" as the id, which are not full supported. For example, '1:sport;2:science' works, but not '0:sport;1:science'. In the case the selection of the 'sport' item will not saved.
If you need to use more comfortable controles with checkboxes you have to implement the behavior with respect of custom editing.