This is a migrated thread and some comments may be shown as answers.

How to change the text of Total-Summary-Row?

1 Answer 190 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 03 Aug 2012, 10:10 AM
Hi!

I use grouping with summaryrows in each group and set ShowParentGroupSummaries in the MasterTemplate = true.
Also I set MasterTemplate.ShowTotals = true.

In the first column, the Total-Summary-Row is titled with the last-item-text of the last group ;-(.

How can I change this text to "Total" (for examle)?

Kind regards

Michael

1 Answer, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 07 Aug 2012, 12:58 PM
Hello Michael,

Thank you for contacting us.

The first of the following two GridViewSummaryItems places the string "Total:" in the OrderID column. The second one puts the maximum freight value in the Freight column.
GridViewSummaryItem summaryItemShipName = new GridViewSummaryItem("OrderID", "Total:", GridAggregateFunction.First);
GridViewSummaryItem summaryItemFreight = new GridViewSummaryItem("Freight", "{0}", GridAggregateFunction.Max);
 
GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem(
    new GridViewSummaryItem[] { summaryItemShipName, summaryItemFreight });
 
this.radGridView1.SummaryRowsBottom.Add(summaryRowItem);

The code above is included in the attached project. I hope you will find it useful.

Feel free to write back if you have further queries.

Greetings,
Boryana
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Michael
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Share this question
or