Hi,
I have deleted a row and saved to the database. But the grid is not refreshing and same with add as well, please see the image below:
Here is my code for save and delete
$("#saveRow").bind({ click: function (e) { $("#Grid").igGridUpdating("endEdit", true, true);
$("#Grid").igGrid("saveChanges", function success() { $('#txtMessage').css('background-color', 'LightBlue').css('color', 'Gray').css('font-weight', 'bold').css('font-family', 'Courier New'); }, function error(jqXHR, textStatus, errorThrown) { //alert(JSON.parse(jqXHR.responseText).ErrorMessage); if (JSON.parse(jqXHR.responseText).ErrorMessage.contains("Success")) { $('#txtMessage').css('background-color', 'LightBlue').css('color', 'Gray').css('font-weight', 'bold').css('font-family', 'Courier New'); // hide the buttons $('#saveRow').prop('hidden', true); $('#cancelRow').prop('hidden', true);
} else { $('#txtMessage').css('background-color', 'DarkRed').css('color', 'White').css('font-weight', 'bold').css('font-family', 'Courier New'); } txtMessage.value = JSON.parse(jqXHR.responseText).ErrorMessage; }); }
});
$("#deleteRow").igButton({ labelText: $("#deleteRow").val(), click: function (e) { var checkstr = confirm('Are you sure you want to delete row(s)?'); if (checkstr === true) { //check if there is an array to delete all selected wors if (rowKeys.length > 0) { $.each(rowKeys, function (ix, el) { //make sure before delete to clear the selection $("#Grid").igGridSelection("clearSelection"); $("#Grid").igGridUpdating("deleteRow", el); $('#saveRow').prop('hidden', false); $('#cancelRow').prop('hidden', false); }); } else if (rowKey !== '') { //check if there is only one row $("#Grid").igGridSelection("clearSelection"); $("#Grid").igGridUpdating("deleteRow", rowKey); $('#saveRow').prop('hidden', false); $('#cancelRow').prop('hidden', false); } else { //else there is no selected rows just the button is clicked alert('No rows selected!'); } rowKeys = []; rowKey = ''; } else { alert('false'); return false; } } });
Escorts in Delhi have finest top class young teens who are seeking for romantic pleasure around Delhi. If you want to become one of them, just meet our Delhi Call Girls to make out with them at anywhere or any time.