private void dgvwChqs_CellLeave(object sender, DataGridViewCellEventArgs e)
{
dgvwChqs.Rows[e.RowIndex].Cells["endingno"].Value = Convert.ToInt32(dgvwChqs.Rows[e.RowIndex].Cells["startno"].Value) + Convert.ToInt32(dgvwChqs.Rows[e.RowIndex].Cells["noofcheques"].Value);
}
It is working fine now.How to inserted datagridview data to database table using c# windows application.Please help me