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

Summary Row Description

1 Answer 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 24 May 2012, 05:17 PM
I have a read-only grid with two summary rows: Total and Average. The first two columns in the simple example provided in the attached screenshot will not be totaled or averaged. Only the third column will be summarized.

I would like to insert text into the first column of each summary row describing what the value in that row represents ("Total" in the total row and "Average" in the average row). This is also displayed in the attached screenshot.

Is it possible to insert text only into a cell of a summary row without performing any calculations on its associated column?

1 Answer, 1 is accepted

Sort by
0
Accepted
Boryana
Telerik team
answered on 29 May 2012, 10:07 AM
Hi Doug,

Thank you for writing.

To add only text in the summary row cell, simply remove the {0} from the FormatString parameter of the GridViewSummaryItem. Here is a sample snippet:
GridViewSummaryItem summaryItemShipName = new GridViewSummaryItem("ShipName", "Write Text Here", GridAggregateFunction.Last);

The attached sample project implements the suggestion above to achieve the desired layout. I hope you will find it useful.

Feel free to write back if you have further queries.

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