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

group footer formating

1 Answer 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 21 Nov 2008, 02:03 AM

Hi,
I have a Grid and group the by country.
can I format the group footer like "China Total: 10" , "US Total: 20", "UK Total :30",  then "Grand Total:60" in the footer?
allow me to include the dataViewRow in the Footer?

Currently, I am using template column like that:
                                    <telerik:GridNumericColumn
                                        UniqueName="AreaSize"
                                        HeaderText="GFA Size"
                                        DataField="area_size"
                                        FooterAggregateFormatString="Total: {0:###,###.00}"
                                        Aggregate="Sum" >                                                   
                                    </telerik:GridNumericColumn>

or can I add the DataRowView in the footer by using this?    

 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
        if (e.Item is GridGroupFooterItem)  
        {  
            GridGroupFooterItem groupFooter = (GridGroupFooterItem)e.Item;  
            groupFooter.Cells[4].Text = "Custom TEXT for agregate count: ";  
        }  
    } 


Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 21 Nov 2008, 07:57 AM
Hello Paul,

Please refer to the Group Footers online demo, which shows how to achieve the desired result:

http://demos.telerik.com/aspnet/prometheus/Grid/Examples/GroupBy/GroupFooter/DefaultCS.aspx


All the best,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or