jqGrid: one radio button per row

I'm trying to setup a column in a jqGrid that has one radio button per row in it, to allow the user to set a single row as the "primary" child of the parent. The following code, however, merely renders empty cells. I imagine the cells are not being put into 'edit mode' or whatever, which is confusing to me because there's an editable checkbox column on the same grid which just works as desired. (There's a navButton at the bottom of the grid that saves the state of the grid if that's relevant.) var createRadioButton = function(value) { return $("", { name: mySubGridID, checked: value }).get(); } var extractFromRadioButton = function(elem) { return $(elem).val(); } $("#grid").jqGrid({ url: '/GetData', datatype: 'json', colModel: [ ... { label: 'Selected', name: 'selected', index: 'selected', editable: true, edittype: 'custom', editoptions: { custom_element: createRadioButton, custom_value: extractFromRadioButton } }, ... ], ... }); Thanks for any help!

以上就是jqGrid: one radio button per row的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏