title: sum column values and display in footer in C#
body: <p>I've the following code which is used to display ItemID, Name, and Price via SQLDATASOURCE. How is it possible to get the SUM of the values in the Price column and display it in the footer?</p>
  
  <pre><code>&lt;asp:GridView ID="GridView2" runat="server" ShowFooter="true" AutoGenerateColumns="False" DataKeyNames="ItemID"
      DataSourceID="SqlDataSource2" Style="position: relative"  &gt;
      &lt;Columns&gt;
          &lt;asp:BoundField DataField="ItemID" HeaderText="ItemID" InsertVisible="False" ReadOnly="True"
              SortExpression="ItemID" /&gt;
          &lt;asp:BoundField DataField="Name" HeaderText="Name" FooterText="Total" FooterStyle-Font-Bold="true" SortExpression="Name" /&gt;
          &lt;asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" /&gt;
          &lt;ItemTemplate&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>Your help is greatly appeciated.</p>
  
  <p>thank you,</p>