I have this method in the footer of gridview
<asp:TemplateField HeaderText="SALARY">
<ItemTemplate>
<asp:Label ID="sal1" runat="server" Text='<%# Eval("Total") %>'></asp:Label>
</ItemTemplate>
<%-- <asp:BoundField DataField="Total" HeaderText="totalprice" />
--%> <FooterTemplate>
<%# gettotal()%>
</FooterTemplate>
</asp:TemplateField>
now inside this method I want to calculate the total how to get the values from all cells which in the total column in gridview ??
public int gettotal()
{
int totalsal = ;
return totalsal;
}