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

[Solved] Passing Aggregate Sum to a Session Variable

1 Answer 132 Views
Grid
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 04 Aug 2009, 02:39 AM
hi

I have an Aggregate Sum at the footer and i want to pass this sum to a session variable. How do i do it? Thanks 

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 04 Aug 2009, 04:30 AM
Hi,

Try out the following code snippet to store the footer sum aggregate value in a session variable:
c#:
protected void RadGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
        if (e.Item is GridFooterItem) 
        { 
            GridFooterItem footer = (GridFooterItem)e.Item; 
            string strtxt = footer["column2"].Text; 
            string sum = strtxt.Substring(strtxt.IndexOf(':')+ 1); 
            Session["footerText"] = sum; 
        } 
    }       

Thanks
Princy.
Tags
Grid
Asked by
L
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or