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

Grid Footer text vs. Group Footer text

2 Answers 247 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 03 Dec 2015, 08:32 PM

Hello,

I have a grid that has a "GroupByExpression" that aggregates the sum of a particular column per grouped item.  This works just fine and I can make it so that the footer text displays something like "Total: 100".  However, the grid itself also has a footer that displays the total of all of the group totals at the very end.  I'm trying to figure out how to change the footer text for this footer value so that it's different from the other grouped footer texts (i.e Total Filters: 200).  In other words, I want the footer text for the subtotals to be different from the footer text for the Grand total.  Is this possible?  If so, then how can I do this?

 Thanks.

2 Answers, 1 is accepted

Sort by
0
Shawn
Top achievements
Rank 1
answered on 07 Dec 2015, 01:51 PM

Hello,

I found a solution myself.  I hope this will help someone else who is looking for the same solution:

I entered the following code in the "ItemDataBound" event for the Radgrid.

if (e.Item is GridFooterItem)
{
    GridFooterItem item = (GridFooterItem)e.Item;
    double value = Double.Parse(item["Quantity"].Text.Split(':')[1].Trim());
    item["Quantity"].Text = "Total Filters: " + value; 
}

0
Viktor Tachev
Telerik team
answered on 08 Dec 2015, 09:40 AM
Hello Shawn,

Thank you for sharing your solution with the community. This can help someone trying to implement similar behavior.

The approach for setting the footers manually is also described in the following article:



Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Shawn
Top achievements
Rank 1
Answers by
Shawn
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or