We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

deleteRecord issues

Thread ID:

Created:

Updated:

Platform:

Replies:

128677 Feb 5,2017 04:59 PM UTC Feb 6,2017 10:12 AM UTC JavaScript 1
loading
Tags: ejGrid
Michael Salzlechner
Asked On February 5, 2017 04:59 PM UTC

had some issues with deleteRecord so I tried to create a simple sample

added the following code to one of your samples

function mydelete() {
   _ejGrid = $("#DestGrid").data("ejGrid");
   
   var selrecs = _ejGrid.getSelectedRecords()
   var rowtodel = selrecs[0];
   
    _ejGrid.deleteRecord("OrderID", rowtodel );
        }

the row never gets deleted. No error either



Prasanna Kumar Viswanathan [Syncfusion]
Replied On February 6, 2017 10:12 AM UTC

Hi Michael, 

Thanks for contacting Syncfusion support. 

We checked in our sample with the following code and we can able to delete the record in the grid.  

Find the code example and sample:  

 
<button id="button" onclick="mydelete()">Delete</button> 
    <div id="Grid"></div> 
 
    <script type="text/javascript"> 
         $(function () { 
             $("#Grid").ejGrid({ 
                 dataSource: window.gridData, 
                 allowSorting:true, 
                 allowPaging: true, 
                 --------------------------- 
                columns: [ 
                       ---------------------------- 
                 ]  
             });           
         }); 
 
         function mydelete(args) { 
             _ejGrid = $("#Grid").data("ejGrid"); 
             var selrecs = _ejGrid.getSelectedRecords() 
             var rowtodel = selrecs[0]; 
             _ejGrid.deleteRecord("OrderID", rowtodel); 
         } 



To find out the root cause of the issue, we need the following details, 

1. Ensure that you have select the particular record in grid before performing the delete operation. 

2. Code example of a Grid. 

3. Ensure that you face any script error in the console? If yes, Share the screenshot of an console error.  

4. Ensure that you have enable isPrimaryKey property for the unique column and allowDeleting property in editSettings API.  

5. Essential Studio Version details.   

Regards, 
Prasanna Kumar N.S.V 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;