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

perform crud operation with server side events with sqlserver

Thread ID:





125098 Jul 21,2016 09:07 AM UTC Jul 22,2016 01:17 PM UTC ASP.NET Web Forms 1
Tags: Grid
Asked On July 21, 2016 09:07 AM UTC


I want to bind grid on page load with my sqlserver database and do the insert, update ,delete, cancel,save  operation  in grid in inline form edit mode so that effects shows on sqlserver database.

thank you.

Jayaprakash Kamaraj [Syncfusion]
Replied On July 22, 2016 01:17 PM UTC

Hi Sharad, 

Thank you for contacting Syncfusion support. 

As per our understanding about your requirement, you would like to update database while perform crud operation in Grid. In Grid, we have many adaptors to perform crud operations and update the database. Refer to the below document for information about adaptors. 
We have created a sample using WebMethodAdaptor with EditMode as InlineForm. Refer to the help document, sample & code example as below. 
<ej:Grid ID="EmployeesGrid" runat="server AllowPaging="true" > 
                <DataManager URL="Default.aspx/Data" Adaptor="WebMethodAdaptor" UpdateURL="Default.aspx/Update" InsertURL="Default.aspx/Add" RemoveURL="Default.aspx/Remove" /> 
                <EditSettings AllowEditing="true" AllowAdding="true" AllowDeleting="true" EditMode="InlineForm" />              
                        <ej:Column Field="OrderID" IsPrimaryKey="true" HeaderText="Order ID" Width="80" /> 
// URL Adaptor using server side  
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)] 
        public static object Data(Syncfusion.JavaScript.DataManager value) 
            Data = operation.Execute(Data, value);// Execute used for for manual typecasting of columns value while filtering, sorting, or any other data operation 
            return new { result = Data, count = count }; // need to return result and count pair  
        // Perform Update action 
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)] 
        public static object Update(Order value) 
//  code for update operation 
// Perform Delete action 
      [ScriptMethod(ResponseFormat = ResponseFormat.Json)] 
      public static object Delete(int key) 
          .. //  code for delete operation 
        // Perform Add action 
      [ScriptMethod(ResponseFormat = ResponseFormat.Json)] 
      public static object Add(Order value) 
.. //  code for add operation 
knowledgebase document for server-side operations : https://www.syncfusion.com/kb/4300/server-side-api-for-datamanager-operations 
Jayaprakash K. 


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

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