private void dgvPendingBillDetails_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (dgvPendingBillDetails.CurrentRow.Index > -1) { DataGridViewRow row = dgvPendingBillDetails.Rows[dgvPendingBillDetails.CurrentCell.RowIndex]; frmListOfProduct obj = new frmListOfProduct(Convert.ToInt32(row.Cells["CustomerID"].Value)); obj.ShowDialog(); } }
private void listOfProductToolStripMenuItem_Click(object sender, EventArgs e) { if (dgvListOfCustomer.CurrentRow.Index > -1) { DataGridViewRow row = dgvListOfCustomer.Rows[dgvListOfCustomer.CurrentCell.RowIndex]; frmListOfProduct obj = new frmListOfProduct(Convert.ToInt32(row.Cells["CustomerID"].Value)); obj.ShowDialog(); } }