You don't wrote which editing mode you use which is really important to get an exact answer on your question. In general jqGrid provide option ajaxRowOptions
, ajaxEditOptions
, ajaxCellOptions
etc which allow you to customize jQuery.ajax calls which makes jqGrid internally. One can use beforeSend
callback of jQuery.ajax to make customization which you require. By the way jqGrid uses the callback internally for loading of the grid and it calls loadBeforeSend
callback if it exist. Other Ajax calls made by jqGrid don't use beforeSend
callback and so you have no callback like loadBeforeSend
.
So you should just specify beforeSend
callback which do the same what you want to do inside of loadBeforeSend
callback, but you need place beforeSend
inside of ajaxRowOptions
, ajaxEditOptions
, ajaxCellOptions
and so on depend on editing mode which you use. You can find example of such implementations in the answer, this one, this one and some another answers.