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. Image for the cookie policy date

Documentation for expected server response for Grid Operations.

Greetings,

I can't seem to locate any information on the web on the expected response for each type of grid operation when using a remote data source with UrlAdapter.

On my own, I managed to figure out that the normal expected response is this:


    count: 3874, 
    items: [{foo: bar},....]
 }
But Im not sure what to return for Grouping or select (in the case of editType = dropdown on a column)

Any guidance would be appreciated.

1 Reply

SR Sellappandi Ramu Syncfusion Team December 30, 2015 09:04 AM UTC

Hi Jason,

Thanks for contacting Syncfusion support.

While using URL Adaptor we need to perform the server operation to return the executed result with count. When we use edit type dropdown to grid column we need to return execute data alone without count from server side.

Note: Dropdown edit type of URLAdaptor issue fix included in Essential studio 2015 service pack 2 release(13.3.0.18).

Please refer to the code example and sample,

public ActionResult DataSource(DataManager dm)

        {

            var DataSource = OrderRepository.GetAllRecords();

            DataResult result = new DataResult();

            DataOperations operation = new DataOperations();

            IEnumerable res = operation.Execute(DataSource, dm);

            result.result = res;

            result.count = DataSource.Count();

            if(dm.Select != null )

                return Json(res, JsonRequestBehavior.AllowGet);

            else

            return Json(result, JsonRequestBehavior.AllowGet);
        }


Sample: https://www.syncfusion.com/downloads/support/forum/121552/ze/EJGrid_121552655505336

Refer to the attached screen shot,

Please refer to the below Knowledge Base document for server side operation, 

https://www.syncfusion.com/kb/4300/server-side-api-for-datamanager-operations

Regards,
Sellappandi R

Loader.
Live Chat Icon For mobile
Up arrow icon