Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to trigger event for all the rows on select all checkbox in jqgrid

Tags:

jquery

jqgrid

I have written something onSelectRow now when I select particular record this code in OnselectRow event get executed even if I trigger setSelection method it excutes. but when I select select All checkbox all the rows get selected without excuting OnselectRow

What I need is when I select top Checkbox I need to execute onSelectRow event for every record of the grid.

like image 408
av1987 Avatar asked Dec 20 '22 07:12

av1987


1 Answers

Hey buddy All you need is to rewrite all the in loop of all the records in onSelectAll event ane you can trigger it from there. for example

     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's It. You are welcome :)

like image 131
Abbignail Avatar answered Dec 22 '22 19:12

Abbignail