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

Need to delete multiple selected record for checkbox column

This knowledge base explains how to delete multiple selected records in Grid.

Solution:

In Grid the multiple selected record using checkbox column can be deleted by using the batchUrl of ejDataManager API.

 The following code example demonstrates how to delete multiple selected records in Grid with normal edit mode.

HTML

 

JS

1. Render the Grid Control.

 

MVC

 

ASP

 

CORE

 

Angular

 

TS

 

2. CRUD operations handling in server-side.

ASP

In ASP.NET we have used WebMethodAdaptor for performing server-side and CRUD operations in Grid.

C#

 

MVC

In ASP.NET MVC, we have used URLAdaptor for performing server-side and CRUD operations in Grid.

C#

 

Core

In ASP.NET Core we have used URLAdaptor for performing server-side and CRUD operations in Grid.

C#

 

Result:

 

Figure 1: At initial rendering with multiple record get selected through checkbox column.

 

 Figure 2: After deleting the multiple selected record in Grid.

 

Article ID: Published Date: Last Revised Date: Platform: Control:
8960 07/12/2018 07/12/2018 ASP.NET Web Forms Grid
Tags:
Did you find this information helpful?
Comments
Akhil Arora Dec 13, 2018

After deleting the record, one row shows as selected. How to clear the selected row. I tried the below code, it didn't work.

actionComplete(e) {

this.grid.clearSelection();

}

Reply
Vignesh Natarajan [Syncfusion] Dec 14, 2018

Hi Akhil,

 

To clear the selection, you can use clearSelection() Method. From the code example provided we found that you have used the clearSelection() method in actionComplete event. We have modified your code to clear selection after deleting a records.

 

Refer the below code example

 

function complete(args){    

            if(args.requestType == "delete")

                this.clearSelection();           

      }

 

Note: if you are using Angular platform kindly refer the below angular API document for your reference

 

For your convenience we have prepared a JS playground sample  

 

Sample: https://jsplayground.syncfusion.com/zjstpgnk

 

Refer our help document for your reference

 

JS - https://help.syncfusion.com/api/js/ejgrid#methods:clearselection

 

Angular - https://help.syncfusion.com/api/angular/ejgrid#methods:clearselection

 

Regards,

Vignesh Natarajan

Reply
Akhil Arora Dec 17, 2018

I am using ASP.NET Core with angular. I am using clearSelection() and it's not clearing the selection.

Reply
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

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