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

GridGroupAggregateObject ?

3 Answers 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
bob
Top achievements
Rank 1
bob asked on 17 Jul 2012, 07:12 PM
Anyone figure out how to pull the value out of the object? I need to set the value of the label based on what level the footer is in... ie root would be "Total: 24323" then the first grouping footer would be "Year: 2343"  and so on... I have everything except how to get the sum of the group from this object.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Jul 2012, 04:15 AM
Hello,

You can access the footer in ItemDataBound event.
C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
   if (e.Item is GridGroupFooterItem)
   {
      GridGroupFooterItem item = (GridGroupFooterItem)e.Item;
      string value=item["Uniquename"].Text;
   }
}

Thanks,
Shinu.
0
bob
Top achievements
Rank 1
answered on 18 Jul 2012, 06:55 PM
ok, that works without the GroupFooterTemplate. Which I am using so that I can change the text of the footer to also include the information about what level the group is... IE "Year Total: {0}" vs "Month Total: {0}" . . . any other suggestions?
0
Eyup
Telerik team
answered on 20 Jul 2012, 12:48 PM
Hi Bob,

Please note that you could also modify the text of the auto generated footer aggregates. I have attached a sample RadGrid web site to demonstrate the described approach. Please check out the attached application and try to make best avail out of it according to your own scenario.

All the best,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
bob
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
bob
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or