Hi Kiirrii
Try this code:-
private void DataGridView1_KeyPress(object sender, KeyPressEventArgs e)
{
foreach(DataGridViewRow row in DataGridView1.Rows)
{
txtTotalAmt.Text = Convert.ToString(Convert.ToDouble(txtTotAmount.Text)+
Convert.ToDouble(row.Cells["amount"].value))
}
}
Hope this work !!