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. Image for the cookie policy date
close icon

Grid deleteRecord Method

Hi, I just noticed that when I use the delete a record with the deleteRecord method of Grid Object like this,and the RemoteSaveAdaptor

    click: function (args) {
        var gridObj = $("#FlatGrid").ejGrid("instance");
        gridObj.deleteRecord("OrderID", { OrderID: 10248 });
the corresponding Action is called two times.
When I use the internal delete with the Toolbar button for the operation, the same action is called 1 time only.

    Andrea Perazzolo

3 Replies

SA Saravanan Arunachalam Syncfusion Team March 25, 2015 02:19 PM UTC

Hi Andrea,

Thanks for using Syncfusion’s product.

In your update you have reported corresponding Action is called two times”. Could you please clarify us what you mean by “corresponding action” whether any Grid event handler? Information provided would be great helpful for us to resolve the issue.

Based on your requirement we have created the sample using the “RemoteSaveAdaptor” and we have deleted a record using grid’s “deleteRecord” method on ejButton’s “Click” event. Please refer the following code snippet.

@(Html.EJ().Button("delete").Text("Delete").ClientSideEvents(cl => { cl.Click("ButtonClick"); }))

function ButtonClick(args) {

var gridObj = $("#Editing").ejGrid("instance");

gridObj.deleteRecord("OrderID", { OrderID: 10271 });


For your convenience we have attached the sample and the same can be downloaded from the following link.

Sample Location: http://www.syncfusion.com/downloads/support/forum/118611/EJGrid1666848757.zip

If possible please replicate the issue in the above sample and send us back with detailed information about the issue.

Please let us know if you have any queries.



AP Andrea Perazzolo March 26, 2015 08:14 AM UTC

I have changed a little the sample so delete the seledted record.
I have not checked if the record is selected so it works only if a record is selected.
If you set a breakpoint in the Remove Controller Action, the Breakpoint is hit 2 times when the deleteRecord Method is called, and 1 time when the record is deleted with the Toolbar button.
I added the [HttpPost] attribute on the Remove Action because it was not called.

     Andrea Perazzolo

Attachment: Index_4b97ae21.zip

RU Ragavee U S Syncfusion Team March 27, 2015 11:14 AM UTC

Hi Andrea,

We have considered “Controller action remove is triggered twice when deleting using deleteRecord method” as a bug and a support incident has been created under your account accordingly to track the status of these. Please log on to our support website to check for further updates.



Ragavee U S

Live Chat Icon For mobile
Up arrow icon