Take a look at: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_buttons. There is an example of what you are looking to do.
John
2009-11-02 04:17:52
Take a look at: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_buttons. There is an example of what you are looking to do.
Try something like this:
/* List for Update Commands */
jQuery("#updatelist").jqGrid({
url:'index.php?list=update',
datatype: 'xml',
mtype: 'GET',
colNames:['ID','URL', 'Limit','Executed','Version'],
colModel :[
{name:'id', index:'id', width:30},
{name:'url', index:'url', width:290},
{name:'limit', index:'limit', width:50, align:'right'},
{name:'executed', index:'executed', width:70, align:'right'},
{name:'note', index:'note', width:150, sortable:false}
],
pager: '#updatepager',
rowNum: 10,
height:'100%',
rowList:[10,20,30],
sortname: 'id',
sortorder: 'desc',
viewrecords: true
}).navGrid('#pjmap',{view:true,edit:false,add:false,del:false,search:false})
.navButtonAdd('#updatepager',{
caption:"",
title:"Create new log entry",
buttonicon:"ui-icon-plus",
onClickButton: function(row_id){
alert("You can add your function here");
},
position:"first"
});