1

I need to hide all the checkboxes on a jQgrid and after read this two posts:

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?

ReynierPM
  • 17,594
  • 53
  • 193
  • 363

3 Answers3

2

If you use free jqGrid fork, then the solution would be very easy. 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. The value of multiselectPosition could be "left", "right" or "none".

Oleg
  • 220,925
  • 34
  • 403
  • 798
0

You can use this code

$("input[type=checkbox]").each(function() {
                $(this).hide();
            });
Damon Dudek
  • 181
  • 6
0

Try this:

$('#gbox_grid_notification_queue').find('input[type="checkbox"]').each(function(){ 
    $(this).hide();
});
Tony Tomov
  • 3,122
  • 1
  • 11
  • 18