Need to trigger an event for all rows on the Select All checkbox in jqgrid

I wrote something onSelectRow now that I select a specific record, this code in the onSelectRow event onSelectRow executed, even if I run the setSelection method that it runs. but when I select the "Select All" checkbox, all rows are selected without exception onSelectRow

What I need, when I select the top checkbox, I need to execute the onSelectRow event for each grid entry.

+4
source share
2 answers

Hi buddy. All you need to do is rewrite all the loops of all the records in the onSelectAll event that you can call from it. eg

  onSelectRow: function(id,status){ ... some code for this id ... },onSelectAll:function(id,status){ for(i=0;i<id.length;i++){ .... same some code for id[i] ..... } } 

and That It. Welcome:)

+9
source

There are onSelectAll tags that should be used to handle the click event on the "select All" chechbox in the multiselect column header.

+1
source

All Articles