Restart single row jqGrid?

How can you reload the SINGLE jqGrid row?

We know how to reload the entire grid, but we just want to update one row when we know that the data in the row has changed.

+6
jquery reload jqgrid
source share
2 answers

If you store data on the server and the server supports data filtering ( single preliminary search ), then you can use the same URL that you use in jqGrid for your jQuery.ajax manual call. You should set only the id filter equal to the line that needs to be updated. If the server setRowData successfully, you can use setRowData or delRowData to update the row or delete the row.

+8
source share

You will also need to update the identifier tr, otherwise it will save it several times the next time you edit it.

 function afterSave(p,p2) { $('#mygrid').setRowData(lastSel,{'id':newId}); $('#'+lastSel).attr("id",newId); } 
+1
source share

All Articles