Search code examples
jqueryjquery-pluginsjqgridjqgrid-formatter

Obtain just the "id" of the row being deleted from jqgrid table


I am new to jQuery and jqGrid tables. I am trying to find just the id of the row being deleted from the jqGrid table. How can I do this?

Thanks


Solution

  • jqGrid don't hold somewhere the ids of deleted rows. If your code calls explicitly methods like delRowData or delGridRow then you can save the ids of the rows which will be deleted in an array.

    If you just use navGrid, inlineNav or formatter: "actions" and you don't call delRowData or delGridRow *directly, then you can use beforeSubmit callback of delGridRow to get the information about the ids of deleting rows before the rows will be deleted. Don't forget to return [true] from beforeSubmit to allow deleting.