Hi,
I used the following code for deleting record or row in the grid :-
$("#grid").on("click", ".k-grid-delete", function(e){
var listTitle = "GraniteTestList";
context = SP.ClientContext.get_current();
if(id!==null || id !== "")
{
var list= context.get_web().get_lists().getByTitle(listTitle);
var listItem = list.getItemById(id);
listItem.deleteObject();
context.executeQueryAsync();
}
//alert(id);
});
It works finely, but after deletion of grid row the sharepoint page also get deleted.
I have been bothered why this is really happening?
Please provide the appropriate guidance.
Thanks in advance.
I used the following code for deleting record or row in the grid :-
$("#grid").on("click", ".k-grid-delete", function(e){
var listTitle = "GraniteTestList";
context = SP.ClientContext.get_current();
if(id!==null || id !== "")
{
var list= context.get_web().get_lists().getByTitle(listTitle);
var listItem = list.getItemById(id);
listItem.deleteObject();
context.executeQueryAsync();
}
//alert(id);
});
It works finely, but after deletion of grid row the sharepoint page also get deleted.
I have been bothered why this is really happening?
Please provide the appropriate guidance.
Thanks in advance.