In JQGrid I want to add a row button that doesnt post back.

Posted by snyder on Stack Overflow See other posts from Stack Overflow or by snyder
Published on 2010-04-22T15:36:04Z Indexed on 2010/04/23 19:33 UTC
Read the original article Hit count: 481

Filed under:
|
|
|

The buttons I have added to the rows still post back even if I specifiy not to do so in the onclick method of the button (onclick=' return false;'). I supose its the grid doing the post back? I am tring to prevent the postback and show my own custom popup forms.

gridComplete: function(){ 
 var ids = $('#jqGridControl1').jqGrid('getDataIDs'); 
 for(var i=0;i < ids.length;i++){ 
 var rowid = ids[i]; 
 de = "<input type='image' title='Delete this record.' src='../images/icn_delete.gif' onclick=' return false;' style='border-width:0px;'/>"; 
 ee = "<input type='image' title='Edit this record.' src='../images/icn_edit.gif' onclick=' return false;' style='border-width:0px;' />"; 
 ve = "<input type='image' title='View related information.' src='../images/house.gif' onclick='return false;' style='border-width:0px;' />"; 
 pe = "<input type='image' title='Print' src='../images/icn_printer.gif' onclick=' return false;' style='border-width:0px;' />"; 
 je = "<input type='image' title='Appointment' src='../images/icn_journal.gif' onclick=' return false;' style='border-width:0px;' />"; 
 se = "<input type='image' title='Select' src='../images/icn_select.gif' onclick=' return false;' style='border-width:0px;' />"; 
 jQuery('#jqGridControl1').jqGrid('setRowData',ids[i],{act:de+ee+ve+pe+je+se}); 
 } 

© Stack Overflow or respective owner

Related posts about jqgrid

Related posts about rows