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

Grid - Custom Adaptor- CRUD "Add/Update/Delete" SQL SERVER

Thread ID:

Created:

Updated:

Platform:

Replies:

148061 Oct 3,2019 05:29 PM UTC Oct 4,2019 11:28 AM UTC Blazor 1
loading
Tags: Grid
Piet Cris
Asked On October 3, 2019 05:29 PM UTC

Hello, can you please give me an example(Server side Blazor) of  "CustomAdaptor" for update/insert/delete in SQL server. (not Api with Entity Framework (EF) Core) 

It would be a great help for me.


Renjith Singh Rajendran [Syncfusion]
Replied On October 4, 2019 11:28 AM UTC

Hi Piet, 

Thanks for contacting Syncfusion support. 

Based on your requirement, we have prepared a custom adaptor sample by binding the SQL Server without Entity Framework. Please download the sample form the link below, 
 
We suggest you to refer to the below documentation for more details regarding custom adaptor in Grid. 
 
You have to extend a class from the DataAdaptor and in that class we will have inbuilt override methods Read/ReadAsync, Insert/InsertAsync, Remove/RemoveAsync, Update/UpdateAsync, BatchUpdate/BatchUpdateAsync to perform customized actions in Grid. You can perform your own customized query operations for the corresponding actions by using the “Insert”, ”Remove”, “Update” methods and then return the value. Please refer the code below, 

 
   public class CustomAdaptor : DataAdaptor 
   { 
        ... 
        public override object Insert(DataManager dm, object value, string key) 
        { 
            //Perform your custom sql query operations for insert operation here 
            ... 
            return value; 
        } 
        public override object Remove(DataManager dm, object value, string keyField, string key) 
        { 
            //Perform your custom sql query operations for remove operation here 
            ... 
            return value; 
        } 
       public override object Update(DataManager dm, object value, string keyField, string key) 
        { 
            //Perform your custom sql query operations for update operation here 
            ... 
           return value; 
        } 
    } 


Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


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

Live Chat Icon For mobile
Live Chat Icon