In form editing's add row, a hidden input of “id” with value “_empty” is added. Can it be changed to other value such as '0'? Or can this hidden input be removed?
If you want to send to server id=0 instead of id=_empty, I'll recomend you use serializeEditData. As input serializeEditData receive data, which jqQuery plan to send. You can construct another data based on input data and return it. Using serializeEditData you don't modify any internal jqGrid data, so you have no side effects compares with any kind of data modification inside of onclickSubmit.
I found that there is a side effect either I use onclickSubmit or serializeEditData. In the settings, I have closeAfterAdd: true, but the dialog does not close after add. The code is like: