Advertisement

06.22.2008 at 12:40PM PDT, ID: 23506068
[x]
Attachment Details

Insert the value of a variable to the footer of a GridView

Asked by dearness in Programming for ASP.NET

Tags: ASP.net, Windows XP IIS6

I have a GridView displaying production counters when a calendar object date is seleted. I want to place the total of the counts at the footer of each column. I have the values already calculated for the three columns but I am having trouble inserting the values. The snippet below shows the code for the first two columns, the first column is Ok, the second I need to display the value of the variable prodLnA1 in the footer of that column.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
<asp:GridView ID="GVLineA" runat="server" 
        allowsorting="true"
        AutoGenerateColumns="False"
        Caption="Line A" 
        HeaderStyle-ForeColor="#FFFFFF"
        showfooter="true"> 
        
        <Columns>    
        <asp:BoundField
                DataField="FccCode"
                sortexpression="FccCode asc"
                HeaderText="Code"
                NullDisplayText="No Data"   
                FooterStyle-BorderWidth="0"
                footertext="Total"> 
        </asp:BoundField>
                  
        <asp:BoundField
                DataField="Fcc1"
                HeaderText="Counter 1"
                NullDisplayText="No Data"
                FooterStyle-BorderWidth="0">
        </asp:BoundField>
[+][-]06.23.2008 at 01:12AM PDT, ID: 21844306

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.23.2008 at 06:33AM PDT, ID: 21845996

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.23.2008 at 12:09PM PDT, ID: 21849270

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.23.2008 at 12:17PM PDT, ID: 21849346

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Programming for ASP.NET
Tags: ASP.net, Windows XP IIS6
Sign Up Now!
Solution Provided By: prairiedog
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628