Hi Abu, i try set a custom button, having this:
<input type="button" value="Edit" onclick="jQuery('#edit_list1').click()">
<input type="button" value="Delete" onclick="jQuery('#del_list1').click()">
here there's no problem, this invoke the funcionality of the edit button of the toolbar. But if i have a custom button in the toolbar and i want to do the same with that…
first add in js the button:
jQuery(document).ready(function(){
jQuery('#list1').jqGrid('navButtonAdd', '#list1_pager',
{'caption' : 'Generar Pago', 'buttonicon' : 'ui-icon-extlink', 'onClickButton': function()
{
var selectedRows = jQuery('#list1').jqGrid('getGridParam','selarrrow');
window.open("facturar.php?id="+selectedRows,'_self')
},
'position': 'last'
});
The question is: how to do for invoke the behavor in my custom button like the edit button of the toolbar???
what value set instead of #edit_list1???
i try this without luck…
<input type="button" value="Facturar" onclick="jQuery('#list1_pager').click()">
thanks…
Just like caption, you can also set 'id' attribute of new toolbar button: see image
http://prntscr.com/gll2wz
After that you can use it in same way as edit_list1: see image
http://prntscr.com/gll2ol