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

GridGroupFooterItem associated GroupByExpression

1 Answer 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
G.
Top achievements
Rank 1
G. asked on 05 Jun 2012, 01:28 AM
I have a RadGrid that is currently configured for paging and grouping...  the grouping will display group footers with aggregate=sum for a data column.

Question

After the data is bound, I would like to replace the pre-existing total values in the GridGroupFooterItems with my own custom values.

More importantly, before I devise my custom values, I would like to determine the group by expression that is associated to that particular GridGroupFooterItem (i.e. GroupByExpression columnname = x; column value = x, and aggregate columnname=x, and aggregate=x).  How can I find this information?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Jun 2012, 06:13 AM
Hi,

You can access the aggregate values using the following code.
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.
Tags
Grid
Asked by
G.
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or