I do not actually get the exact problem. But here is how to get the textbox values inside a gridview and sum it.
TextBox txt1;
TextBox txt2;
int sumPerRow = 0;
foreach(GridViewRow row in GridView1.Rows)
{
txt1 = (TextBox)row.Cells[0].FindControl("sun1b");
if(String.IsNullOrEmpty(txt1.Text))
{
txt1.Text = "0";
}
txt2 = (TextBox)row.Cells[1].FindControl("mon1b");
if(String.IsNullOrEmpty(txt2.Text))
{
txt2.Text = "0";
}
sumPerRow = Convert.ToInt32(txt1.Text) + Convert.ToInt32(txt2.Text);
}
Hope you get it from here. The logic is there my friend. :)
Regards,
Eduard