[英]How do I hide all the checkboxes in jQgrid?
I need to hide all the checkboxes on a jQgrid and after read this two posts: 我需要隐藏jQgrid上的所有复选框,并在阅读以下两篇文章之后:
This is what I did: 这是我所做的:
// this only hides the first checkbox on the header
$('#gbox_grid_notification_queue').find('input[type="checkbox"]').hide();
// this does not hide anything at all
$('#gbox_grid_notification_queue').find('td input[type="checkbox"]').hide();
// this does not hide anything, same as previous one
var grid_notification_queue = $("#grid_notification_queue");
$("#cb_" + grid_notification_queue.id).hide();
What I am missing here? 我在这里想念的是什么?
If you use free jqGrid fork, then the solution would be very easy. 如果您使用免费的jqGrid fork,那么解决方案将非常简单。 You need just add
您只需要添加
multiselectPosition: "none"
option to prevent creating checkboxs. 选项以防止创建复选框。 It improves additionally the performance of multi-selection.
此外,它还提高了多选的性能。 I remind that here you can find different options of free jqGrid, which has relation with selection.
我提醒您, 在这里您可以找到免费jqGrid的不同选项,这些选项与选择有关。 The value of
multiselectPosition
could be "left"
, "right"
or "none"
. multiselectPosition
的值可以为"left"
, "right"
或"none"
。
You can use this code 您可以使用此代码
$("input[type=checkbox]").each(function() {
$(this).hide();
});
Try this: 尝试这个:
$('#gbox_grid_notification_queue').find('input[type="checkbox"]').each(function(){
$(this).hide();
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.