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

Batch Delete in Data Grid

Thread ID:





144901 May 28,2019 07:22 AM UTC May 30,2019 12:39 PM UTC Vue 1
Tags: Data Grid
sayali saitawdekar
Asked On May 28, 2019 07:22 AM UTC

How can i do batch delete in Data Grid? Also how can i select multiple rows in data grid and get id's of all those selected rows?

Hariharan J V [Syncfusion]
Replied On May 30, 2019 12:39 PM UTC

Hi Sayali, 

Thanks for contacting Syncfusion support. 

Query #1: How can i do batch delete in Data Grid? 

We suggest you to set edit mode as “Batch” in Grid editSettings property to perform the batch add, batch delete and batch update action in Grid. You can set the edit mode as “Batch” like as below code snippet, 

editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true, mode: "Batch" } 

We have already discussed about this topic in our help documentation. So please refer the  below documentation link to know more details about Grid batch editing, 

Query #2:  Also how can i select multiple rows in data grid 

We suggest to set type as “Multiple” in Grid selectionSettings property to enable the multiselect option. You need use “Ctrl + mouse left click” to perform the multi selection in Grid. 

selectionOptions: { type: "Multiple" } 

Query #3: get id's of all those selected rows? 

We suggest to use the Grid getSelectedRecords method to get the selected records details. Please refer the below code snippet, 

btnClick: e => { 
        var grid = document.getElementById("Grid").ej2_instances[0]; 
        var selectedRecords = grid.getSelectedRecords(); 

Also, we would like to inform that getSelectedRows and getSelectedRowIndexes methods of the Grid. This methods are used to find the selected row elements and find the selected row indexes. Please refer the below documentation links to know more details about this methods, 

We have prepared the sample this requirement and you can find that sample from the below link for further assistance, 



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.

Please sign in to access our forum

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon