Hi,
Try using the RowDataBound Event. Use the following code:
protected void gridview_RowDataBound(object sender, GridViewRowEventArgs e)
{
DataRowView drview = e.Row.DataItem as DataRowView;
if (e.Row.RowType == DataControlRowType.DataRow)
{
int value1 = Int32.Parse(e.Row.Cells[0].Text);
int value2 = Int32.Parse(e.Row.Cells[1].Text);
e.Row.Cells[2].Text = Convert.ToString(value1+ value2);
}
}
Hope this helps and gives you an idea :)
Regards,
Praneet