Custom Adaptor RemoveAsync not being called

Hello!

I've been using some custom adaptors to fetch data remotely and now for deleting I implemented the RemoveAsync method. The ReadAsync works perfectly but for some reason the remove is not getting called.

I have 2 cases that I need to delete - both cases are implementing the toolbar.
  • Hierarchy Grid and I need to remove an element from the subgrid.
  • Normal grid and I want to remove an element
in attachment you can find an example of the issue being described.

Kind Regards,
Rodrigo F.

Attachment: BlazorAppGridSample_3b58821f.7z

1 Reply

RS Renjith Singh Rajendran Syncfusion Team March 31, 2020 01:34 PM UTC

Hi Rodrigo, 

Thanks for contacting Syncfusion support. 

We have analyzed your sample application. We could see that you have not enabled "IsPrimaryKey" to any of the columns in both the Grids. To perform CRUD operation in Grid, it is a must to set "IsPrimaryKey" for an unique value column in Grid. Based on the primary key column value only we will perform CRUD in Grid. So, we suggest you to ensure to set the "IsPrimaryKey" for a unique value column in Grid. 
 
Please refer the code below, 
 
 
[ViewAll.razor] 
 
      <GridColumn Field=@nameof(OrganizationCraft.Name) IsPrimaryKey="true" HeaderText="Name"></GridColumn>           @*Set a unique value column as primary*@ 
 
[NormalGrid.razor] 
 
      <GridColumn Field=@nameof(OrganizationCraft.Name) HeaderText="Name" IsPrimaryKey="true" AllowGrouping="false"></GridColumn>   @*Set a unique value column as primary*@ 
    
 
Documentation :  

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


Loader.
Up arrow icon