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

Delete button on Toolbar

Thread ID:

Created:

Updated:

Platform:

Replies:

142322 Jan 28,2019 03:24 PM UTC Jan 30,2019 03:59 AM UTC Angular - EJ 2 3
loading
Tags: Grid
Ane
Asked On January 28, 2019 03:24 PM UTC

Hello, 

I have implemented the Delete button of the Toolbar and when I choose with a checkbox, for example, the fifth row and I press the button it deletes the first row not the fifth one. Here is the code:

editSettings: EditSettingsModel;
toolbar: ToolbarItems[] | Object;
@ViewChild('grid')
grid: GridComponent;

constructor(private time: Time) {
this.editSettings = { allowEditing: true, allowAdding: true, allowDeleting: true };
this.toolbar = [ 'Delete'];
}

<ejs-grid #grid [dataSource]='dataDelete' [editSettings]='editSettings' [toolbar]='toolbar' (actionComplete)="onActionComplete($event)">
<e-columns>
<e-column type='checkbox' width='70'></e-column>
<e-column ----------------------------------------></e-column>
<e-column ----------------------------------------></e-column>
</e-columns>
</ejs-grid>

Looking forward to hearing from you, 

Ane Perez de Nanclares

Thavasianand Sankaranarayanan [Syncfusion]
Replied On January 29, 2019 10:08 AM UTC

Hi Ane, 

Greetings from Syncfusion. 

Based on your detail we suspect that first record gets deleted when we select any other one in Grid. This issue may cause of isPrimaryKey column is not defined in Grid. we have already discuss about the above mention query in the following documentation. 


Regards, 
Thavasianand S. 


Ane
Replied On January 29, 2019 01:19 PM UTC

Thank you!

Thavasianand Sankaranarayanan [Syncfusion]
Replied On January 30, 2019 03:59 AM UTC

Hi Ane, 
 
We are happy that the problem has been solved. 
 
Please get back to us if you need any further assistance.  
                          
Regards, 
Thavasianand S.

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.

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

;