Search This Blog

Thursday, 20 December 2012

onSelectRow event in jqgrid

 

The example below specifies the action to take when a row is selected. 
 
var lastSel;
jQuery("#gridid").jqGrid({
...
   onSelectRow: function(id){ 
      if(id && id!==lastSel){ 
         jQuery('#gridid').restoreRow(lastSel); 
         lastSel=id; 
      } 
      jQuery('#gridid').editRow(id, true); 
   },
...
});

No comments:

Post a Comment