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

How to change the url action path for the Grid CRUD operations?

While specifying the URL that is to be triggered on performing the CRUD operations, the action name is to be prepended with the controller name in order to avoid the routing issues.

Solution

In the dataSource property of the Grid, you can bind a URL link and thus obtain and process the data from the Server/Code-behind.

The various properties of the dataManager class are tabulated as follows.

Properties

Description

url

Used to fetch data from the remote dataSource

updateUrl

Used to update changes made in the database

insertUrl

Used to insert new data in the database

removeUrl

Used to remove a record in the database

batchUrl

Used to make batch changes in the database

crudUrl

Used when same method is to be triggered for all insert, update and remove operation

json

Used to fetch data from a local dataSource

adaptor: “jsonAdaptor

Used to process json data

adaptor: “UrlAdaptor

Used when binding data from a remote dataSource

adaptor: “remoteSaveAdaptor

Used when binding local data to the grid dataSource

adaptor: “ODataAdaptor

Used for consuming data from a OData service

adaptor: “WebApiAdaptor

Used for retrieving data from WebApi service

adaptor: “customAdaptor

Used to customize the adaptor available in dataManager class

Example

In the following code example, the dataSource is bound to the Grid from a remote data and an UrlAdaptor is used.

JS

MVC

ASP.NET

Screenshot:

http://help.syncfusion.com/ug/js/ImagesExt/image48_60.png

Figure 1: Editing record

http://help.syncfusion.com/ug/js/ImagesExt/image48_61.jpg

Figure 2: Obtaining the values of edited record at server side

http://help.syncfusion.com/ug/js/ImagesExt/image48_62.jpg

Figure 3: Modified Grid with Post operation displayed in the bottom

Article ID: Published Date: Last Revised Date: Platform: Control:
3013 12/10/2014 07/07/2016 JavaScript ejGrid
Did you find this information helpful?
Comments
Kalpana Aug 13, 2018

Hi,

I am using Javascript for my ui development using asp.net mvc. In post action when i am using DataManager as method argument it giving compile that DataManager not found. How to include DataManger in my action method? is there dll need to download ? i saw some where that Syncfusion.Javascript.dll would resolve but where to download that?

Thanks in Advance

Vinod.

Reply
Alan Sangeeth S [Syncfusion] Aug 13, 2018

hi Vinod,


DataManager Model class comes from "Syncfusion.Javascript" namespace in the library "Syncfusion.EJ.dll". You can download ASP.NET MVC Syncfusion product from the below link to use the library "Syncfusion.EJ"

https://www.syncfusion.com/account/downloads/aspnetmvc/16_2_0_46 


Also please refer the following link for further details

https://www.syncfusion.com/products/aspnetmvc 


You may also create your own Model class for DataManager that matches the JSON structure of data sent in Ajax post.


Regards,
Alan Sangeeth S

Reply
Add Comment
You must log in to leave a comment

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.