@ Eric made me on the right track on this. His solution works, but retains the existing pseudo-modal user interface for the popup I wanted to avoid.
It also does not take advantage of the ASP.NET JqGrid component . The component actually performs all CRUD operations while it is connected to a correctly configured data source (ObjectDataSource, SqlDataSource, etc.).
This missing element for me was the mechanic behind the components of CRUD operations. When I got off Fiddler, I was able to see that it sends the corresponding data to the same page with the ClientID of the JqGrid object in the query string:
MyPage.aspx? JqGridID = ctl00_ctl00_Content_Content_MyJqGrid
When deleted, the contents of the POST are the same as @Erik describes:
oper = del & id = 18
So, I was able to duplicate the operation myself, in order to maintain full control over the entire process:
$(".DeleteButton", grid).click(function(e) { var rowID = getRowID(this); $(grid).setSelection(rowID, false); if (confirm('Are you sure you want to delete this row?')) { var url = window.location + '?jqGridID=' + grid[0].id; var data = { oper: 'del', id: rowID }; $.post(url, data, function(data, textStatus, XMLHttpRequest) { $(grid).trigger("reloadGrid"); }); } else { $(grid).resetSelection(); }
Herb caudill
source share