Hello,
I have jqgrid with data. I have an problem like after deleting the record in jqgrid is not loading with refresh data.
Below is my Code. Please give me the solution
- onclickSubmit: function (response, postdata){
- var rowData = jQuery(this).jqGrid('getRowData', postdata);
- $.ajax({
- type: "POST",
- url: "/Element/DeleteElementData",
- data: { Id: rowData.ID },
- error: function (xhr, status, error) {
- toastr.error('An error occured while deleting the record...'); },
- success: function (response) {
- if (response.IsSuccess) {
- toastr.success(response.Message);
- ReloadGrid(); } else {
- toastr.error(response.Message); } }
- });
- function ReloadGrid() {
-
- $("#ElementsGrid").jqGrid("setGridParam", { datatype: "json" })
- .trigger("reloadGrid", [{ current: true }]); }