Hey ...
Create grid view like this
<asp:GridView ID="gv" runat="server" ShowFooter="true">
</asp:GridView>
and write the c# code like..
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
gv.RowDataBound += new GridViewRowEventHandler(gv_RowDataBound);
}
double sum = 0;
protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
sum += Convert.ToDouble(e.Row.Cells[0].Text);
}
if (e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cells[0].Text = sum + "";
}
}
i think may help to solve ur prob...