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.
Unfortunately, activation email could not send to your email. Please try again.

Grid deleteRecord Method

Thread ID:





118611 Mar 24,2015 07:32 AM Mar 27,2015 07:14 AM ASP.NET MVC 3
Tags: Grid
Andrea Perazzolo
Asked On March 24, 2015 07:32 AM

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

Saravanan Arunachalam [Syncfusion]
Replied On March 25, 2015 10:19 AM

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.



Andrea Perazzolo
Replied On March 26, 2015 04:14 AM

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

Ragavee U S [Syncfusion]
Replied On March 27, 2015 07:14 AM

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


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.

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.