-1

I have some issue when handling JqGrid, here my case:

  1. I tried to set multiselect:true.

  2. I tried to set some rows check box, disable with check mark using loadComplete event handle.

  3. If I am selecting all check boxes from my list, here how can I get enabled check boxes row IDs?

halfer
  • 19,824
  • 17
  • 99
  • 186
user10489
  • 255
  • 2
  • 6
  • 17
  • Duplicate of the question on the link http://stackoverflow.com/questions/5259262/jqgrid-multiselect-and-disable-check-conditional – Ajo Koshy Mar 03 '13 at 06:34

1 Answers1

0

I assume you have defined your jqgrid object as grid

grid.jqGrid(

beforeSelectRow: function(rowid, e) {

    var disabledCheckboxes = $("tr#"+rowid+".jqgrow > td > input.cbox:disabled", grid[0]);

    if (disabledCheckboxes.length === 0) {

        return true;    // allow select the row

    } else {

        return false;   // not allow select the row

    }

},

onSelectAll: function(aRowids,status) {

    if (status) {

        var Checkboxes = $("tr.jqgrow > td > input.cbox:disabled", grid[0]);

        Checkboxes.removeAttr("checked");

          grid[0].p.selarrrow = grid.find("tr.jqgrow:has(td > input.cbox:checked)")

            .map(function() { return this.id; }) // fatch ids

            .get(); // convert to instance of Array

    }

});
halfer
  • 19,824
  • 17
  • 99
  • 186
NBaua
  • 583
  • 4
  • 16
  • 33