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

No summary when using URLAdapter

Thread ID:





128393 Jan 18,2017 07:15 PM UTC Jan 24,2017 04:42 AM UTC ASP.NET MVC 3
Tags: Grid
Michael Lambert
Asked On January 18, 2017 07:15 PM UTC

I also get 0 from summary. Some fields in the DB may contain a NULL values and it in INT type.

                            .Datasource(ds => ds.URL(@Url.Action("GetData", "OneCloud")).UpdateURL(@Url.Action("Update", "OneCloud")).Adaptor(AdaptorType.UrlAdaptor))


        .SummaryRow(row =>
            row.Title("Totals").SummaryColumns(col => { col.SummaryType(SummaryType.Sum).Format("{0:N}").DisplayColumn("Storage").DataMember("Storage").Add(); }).Add();


Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On January 19, 2017 01:19 PM UTC

Hi Michael, 
We suspect that your URL method is missing the server-side operation for the summary rows. When using UrlAdaptor, you have to handle all the Grid actions in the server-end. Likewise, the SummaryRows also falls to the same category.  
In the server-end, you have to select he required aggregate columns and return the same to the client-end. Refer to the following code example. 
        .Datasource(ds => 
        .SummaryRow(row => 
                .SummaryColumns(col => {  
                 . . . 
        public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm) 
            IEnumerable datasource = new NorthwindDataContext().OrdersViews.ToList(); 
            DataResult result = new DataResult(); 
            DataOperations operation = new DataOperations(); 
            List<string> str = new List<string>(); 
            if (dm.Aggregates != null) 
                for (var i = 0; i < dm.Aggregates.Count; i++) 
                result.aggregate = operation.PerformSelect(datasource, str); 
            int count = datasource.AsQueryable().Count(); 
                 . .  
                    . . . 
            result.count = count; 
            result.result = datasource; 
            return Json(result, JsonRequestBehavior.AllowGet); 
        public class DataResult { 
            public IEnumerable result { get; set; } 
            public int count { get; set; } 
            public IEnumerable aggregate { get; set; } 
We have also prepared a sample that can be downloaded from the following location. 
Refer to the following Help Document. 
Seeni Sakthi Kumar S. 

Michael Lambert
Replied On January 23, 2017 05:54 PM UTC

Worked!  Thanks!!

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On January 24, 2017 04:42 AM UTC

Hi Michael,  
We are happy to hear that your requirement has been achieved. Please get back to us, if you require further assistance on this. 
Seeni Sakthi Kumar 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

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