First let me thank you in reading your responses I was able to come up with this solution. I needed some specific behavior for cell editing. I needed to be able to select only a single row with a click. No multi select. I needed cell editing that was activated upon a double click. I needed to be able to cancel an edit if a row other than the one selected was clicked. I also needed to be able to restrict user input. My initial google searches brought me here, and I had just about given up hope when I stumbled across other items you had posted.
Here is the solution that I came up with. Most of it was from your previous answers. I made some changes. So most of this credit goes to you but I wanted to post it here to help others. This is my first time posting a solution so I hope it is clear and helps.
edit.iCol. edit.iRow and edit.rowID are stored so that we can do a cancel on the edit. User your own variables here to store these values.
cellEdit: true,
cellsubmit: 'clientArray',
beforeSelectRow: function(rowid) {
if (edit.iRow != null && rowid !== edit.rowID) {
$('#list').jqGrid("restoreCell",edit.iRow, edit.iCol);
edit.iRow = edit.iCol = null;
}
$('#list').jqGrid('setSelection', rowid);
},
afterSaveCell: function (rowid, name, val, iRow, iCol) {
alert("after");
},
beforeSaveCell: function (rowid, name, val, iRow, iCol) {
alert("before");
},
ondblClickRow: function (rowid, iRow,iCol) {
edit.iRow = iRow;
edit.iCol = iCol;
edit.rowID = rowid;
$("#list").editCell(iRow, iCol, true);
}