I have a jqgrid with an inline delete button. This button sends a post to a php file which would, in turn, go delete the record from the database. Unfortunately, I cannot seem to figure out how to send additional data with the post call. I don’t want to rely on the row number. Rather, I wish to add the value from a column (childId) to the POST. Can someone recommend how to send, for example, the value of the childId cell for the deleted row along with the post?
Here is my table:
jQuery(“#team”).jqGrid({
url: ‘TeamRetrieval.php?userId=’+userId,
datatype: “json”,
colNames: ,
colModel: [
{name: ‘childId’, index: ‘childId’, align: ‘center’, sorttype: ‘string’},
{name: ‘user_email’, index: ‘user_email’, align: ‘center’, sorttype: ‘string’},
{name: ‘user_registered’, index: ‘user_registered’, align: ‘center’, sorttype: ‘string’},
{ name: ‘delete’, formatter: ‘actions’, width: 40, align:’center’, sortable: false,
formatoptions:{
keys: true,
editbutton: false,
editformbutton: false,
delbutton: true,
delOptions: { url: ‘TeamRetrieval.php?userId=’+userId}
}
}
],
mtype: “GET”,
sortorder: ‘asc’,
sortname: ‘childId’,
caption: “Existing Team Members”,
});