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

Grid Summary And Remote Data

Thread ID:





119447 Jun 22,2015 11:51 PM UTC Jun 24,2015 12:36 PM UTC ASP.NET MVC 3
Tags: Grid
Ümüt Karakoç
Asked On June 22, 2015 11:51 PM UTC

How can I show my grid summary when I working with remote data(wep api) ?

my current wep api code is like that
            var accounts =
                from acc in db.Accounts
                where acc.Deleted == false
                orderby acc.Name
                select new
                    Id = acc.Id,
                    Code = acc.Code,
                    Name = acc.Name,
                    IdentityCode = acc.IdentityNo,
                    Group = acc.Group.Name,
                    Branch = acc.Branch.Name,
                    Active = acc.Active,
                    DefaultPhone = acc.PhoneNumbers.Select(x => x.Name).FirstOrDefault(),
                    Balance = //bla bla bla
             // I can return count and result. but how can I return Balance Total Summary?
            var result = new
                result = accounts.Skip(dm.Skip).Take(dm.Take),
                count = accounts.Count(),
            return Json(result, JsonRequestBehavior.AllowGet);

Ajith R [Syncfusion]
Replied On June 23, 2015 08:51 AM UTC

Hi Ümüt,

Thanks for using Syncfusion products.

Query: How can I show my grid summary when I working with remote data(wep api) ?

We suggest you to use WebApiAdaptor and enable ShowSummay with adding the SummaryRows and SummaryColumns in the Grid properties to achieve your requirement. Please refer the below code snippet for further details.


    .Datasource(ds => ds.URL("/api/Orders").Adaptor(AdaptorType.WebApiAdaptor))



    .SummaryRow(row =>


        row.Title("Sum").SummaryColumns(col => { col.SummaryType(SummaryType.Sum).Format("{0:C}").DisplayColumn("Freight").DataMember("Freight").Add(); }).Add();






Note: We have analyzed your code snippet and found that you have used UrlAdaptor functionalities in your controller. For your kind information when we use Web API controller it will perform the data functionalities itself and we don’t need to perform custom operations to return the result.

Please refer the below UG Doc and Online Demo link to know further details about Summary functionality in ejGrid.

UG Doc: http://help.syncfusion.com/ug/js/index.html#!Documents/summary1.htm

Online Demo: http://mvc.syncfusion.com/demos/web/grid/summary

For your convenience we have created a simple sample and the same can be downloaded from the below link.

Sample Link: http://www.syncfusion.com/downloads/support/forum/119447/ze/WebApiGrid1204689187

Please let us know if you have any concerns.

Ajith R

Ümüt Karakoç
Replied On June 23, 2015 09:28 AM UTC

thank you. it is why I recommened syncfusion to every body :)

Ajith R [Syncfusion]
Replied On June 24, 2015 12:36 PM UTC

Hi Ümüt,

Thanks for your update.

We are happy to hear that your requirement has been achieved in your end.

Please get back to us if you have any other concerns.

Ajith R


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