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

No summary when using URLAdapter

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();


3 Replies

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team 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. 

ML Michael Lambert January 23, 2017 05:54 PM UTC

Worked!  Thanks!!

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team 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. 

Live Chat Icon For mobile
Up arrow icon