I am retrieving the SQL data into data grid view now I want particular row data into the other web from, but I am getting null object reference.
System.NullReferenceException: 'Object reference not set to an instance of an object.'
public void dgvEmployee_CellContentClick(object sender, DataGridViewCellEventArgs e) 
{ 
    this.Close();
    Update up = new Update();
    up.IdBox.Text = this.dgvEmployee.CurrentRow.Cells[0].Value.ToString(); 
    up.NameBox.Text = this.dgvEmployee.CurrentRow.Cells[1].Value.ToString(); 
    up.ManagerBox.Text = this.dgvEmployee.CurrentRow.Cells[2].Value.ToString(); 
    up.ShowDialog();
}
 
    