Thanks i have done it this way.
private void getDebOutInvBalDataGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
try
{
if ((bool)this.getDebOutInvBalDataGridView[e.ColumnIndex, e.RowIndex].Value == true)
{
totalAmount = totalAmount - float.Parse(getDebOutInvBalDataGridView.Rows[getDebOutInvBalDataGridView.CurrentCell.RowIndex].Cells["dataGridViewTextBoxColumn3"].Value.ToString());
tbTotal.Text = totalAmount.ToString();
}
else if ((bool)this.getDebOutInvBalDataGridView[e.ColumnIndex, e.RowIndex].Value == false)
{
totalAmount = totalAmount + float.Parse(getDebOutInvBalDataGridView.Rows[getDebOutInvBalDataGridView.CurrentCell.RowIndex].Cells["dataGridViewTextBoxColumn3"].Value.ToString());
tbTotal.Text = totalAmount.ToString();
}
}
catch { };
}
private void getDebOutInvBalDataGridView_CurrentCellDirtyStateChanged(object sender, EventArgs e)
{
getDebOutInvBalDataGridView.CommitEdit(DataGridViewDataErrorContexts.Commit);
}