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

ejGrid via a datamanger calling Web API Get method twice after a requery

Thread ID:





127967 Dec 22,2016 06:41 AM UTC Dec 23,2016 09:40 AM UTC ASP.NET MVC 1
Tags: Grid
Stephen Harris
Asked On December 22, 2016 06:41 AM UTC

I am populating an ejGrid via a datamanger and find that when I run the search query a second and third time etc it calls my Web API Get method twice.  When I run the query the first time it only calls the Get method once.  Do I need to clear the data from the grid before a new query occurs? Will this prevent the Web API Get method being called twice?   I tried clearSearching and gridObj.refreshContent() but these returned client side errors.  The code I am using is below.  Note that the rest of the client side function does not call the Web API Get method.  This only occurs as per below:

            var dataManager = ej.DataManager({
                url: urlStr,
                enableCaching: false,
                crossDomain: true,
                adaptor: new ej.WebApiAdaptor(),
                offline: true

                dataSource: dataManager,
                recordDoubleClick: function (args) { SelectedRow(args, archiveURLPath) },
                // selectionType: "multiple",
                allowPaging: true,
                pageSettings: { pagesize: 12 },
                actionComplete: function (args) {

                    var gridObj = $("#Grid").ejGrid("instance");
                    if (args.requestType == "refresh" && flag == true) {
                        flag = false;

Ragavee U S [Syncfusion]
Replied On December 23, 2016 09:40 AM UTC

Hi Stephen, 

We have created a grid sample with the provided code sample and the issue is not reproducible at our end. Please find the sample and video demo in below location. 

Also, we could see that you have defined the offline property of the ejDataManager as true which on enabling loads the data in offline mode. With offline as true, the DataManager requests the server only once and further data manipulation operation can be done at client side itself. Thus, no other post request will occur on performing any operation in grid. 

So, please try the above sample and if you still face any issues, please share the following information. 

1.       On what action, the re-query triggers the WebAPI Get method? 
2.       Clear replication procedure 
3.       Video demo of the issue 
4.       If possible, please reproduce the issue in the above provided sample and share. 

Ragavee U S. 


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