tags:

views:

959

answers:

2
A: 

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
tried it, not working. updated my post with problem description.
maxedmelon
BTW - the example I left below is for an add button, but you can easily change it to only a delete button.
John
+2  A: 

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"
  });
John