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.
Unfortunately, activation email could not send to your email. Please try again.

GridSummaryRow

Thread ID:

Created:

Updated:

Platform:

Replies:

125425 Aug 16,2016 01:06 PM Aug 17,2016 05:12 PM Xamarin.Android 1
loading
Tags: SfDataGrid
Miguel Arenas
Asked On August 16, 2016 01:06 PM

After adding GridSummaryRow, the GroupColumnDescription is replaced, how can I keep both?



            GridSummaryRow subtotal = new GridSummaryRow();            
            subtotal.Title = " Total Items:{CaptionSummary}";            
            subtotal.ShowSummaryInRow = true;
            subtotal.SummaryColumns.Add(
                    new GridSummaryColumn()
                    {
                        Name = "CaptionSummary",
                        MappingName = "Invent",
                        Format = "{Sum}",
                        SummaryType = Syncfusion.Data.SummaryType.Int32Aggregate
                    }

                    );

            sfGrid.CaptionSummaryRow = subtotal;

            sfGrid.GroupColumnDescriptions.Add(new GroupColumnDescription() { ColumnName = "Product" });


Ashok N [Syncfusion]
Replied On August 17, 2016 05:12 PM

Hi Miguel, 

Thank you contacting Syncfusion Support, 

We have checked your query and you can achieve your requirement by setting CaptionSummaryRow format first using summaryRow.Title and set the GridSummaryRow as in the below code example: 
GridSummaryRow summaryRow = new GridSummaryRow(); 
summaryRow.Title = "StudentID: {Key} - {CaptionSummary}"; 
summaryRow.ShowSummaryInRow = true; 
var summaryColumn = new GridSummaryColumn() 
{ 
    Name = "CaptionSummary", 
    MappingName = "StudentID", 
    Format = " {Count} --- TotalItems : {Sum}", 
    SummaryType = SummaryType.Int32Aggregate 
}; 
             
summaryRow.SummaryColumns.Add(summaryColumn); 
sfGrid.CaptionSummaryRow = summaryRow; 
sfGrid.GroupColumnDescriptions.Add(new GroupColumnDescription() { ColumnName = "StudentID" }); 

You can download the sample from the below link: 

Regards, 
Ashok 


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.

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.

;