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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Total Row for individual columns

Thread ID:

Created:

Updated:

Platform:

Replies:

105176 Sep 14,2012 01:42 PM UTC Sep 18,2012 06:02 AM UTC ASP.NET MVC (Classic) 1
loading
Tags: Grid
Ross Macintyre
Asked On September 14, 2012 01:42 PM UTC

Hi

I have looked through the ASP.net MVC samples and was wondering whether it is possible to have totals at the bottom of multiple columns.

I have a grid which shows timesheet data which includes columns for the Project Code and Activity as well as columns for Monday to Sunday.

I want to enter to total row at the bottom of the Grid which dynamically totals the hours in each column of the day columns.

Does Syncfusion support this and if so, any example available ;-)

Regards

Ross

Mohanraj S [Syncfusion]
Replied On September 18, 2012 06:02 AM UTC

Hi Ross,

 

Thanks for using Syncfusion products.                 

 

Your requirement "Sum of individual columns" can be achieved through using GridSummaryRowDescriptorCollection.

 

Please refer the following code snippet:

private GridSummaryRowDescriptorCollection SummaryCollection

{

            get

            {

                        GridSummaryRowDescriptorCollection summaryRowsCollection = new GridSummaryRowDescriptorCollection();              

                        GridSummaryColumnDescriptor SumDuration = new GridSummaryColumnDescriptor("Duration", SummaryType.Int32Aggregate, "Duration", "{Sum:####}");

                        GridSummaryRowDescriptor sumRow =new GridSummaryRowDescriptor("tot");

                        sumRow.Title = "Total Duration";

                        SumDuration.Prefix = "Tot : ";

                        sumRow.SummaryColumns.Add(SumDuration);

                        summaryRowsCollection.Add(sumRow);

                        return summaryRowsCollection;

            }

}

 

Please refer to the below link to download the sample application.

 

SampleSummaryColumn.zip

 

Please let me know if you have any concerns.

 

Regards,

Mohanraj


CONFIRMATION

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.

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

;