This is a migrated thread and some comments may be shown as answers.

page get's delete after deletion of record

0 Answers 15 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kalpesh
Top achievements
Rank 1
Kalpesh asked on 19 Nov 2012, 10:34 AM
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.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Kalpesh
Top achievements
Rank 1
Share this question
or