try { if (dgvItem.CurrentCell.ColumnIndex == 1) { //for (int i = 0; i < dgvItem.Rows.Count+1; i++) // if (dgvItem.CurrentRow.Index==0) //{ string itemDis; itemDis = Convert.ToString(dgvItem.CurrentRow.Cells[1].Value); //itemDis = Convert.ToString(dgvItem.Rows[i].Cells[1].Value); string itemQty; itemQty = Convert.ToString(dgvItem.CurrentRow.Cells[3].Value); //itemQty = Convert.ToString(dgvItem.Rows[i].Cells[3].Value); if (itemDis != "" && itemQty == "") { DialogResult reply = MessageBox.Show("Please Fill the data", "", MessageBoxButtons.OK, MessageBoxIcon.Error); if (reply == DialogResult.OK) { dgvItem.Focus(); } } } } catch { }
RowLeave
RowValidating
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)