private void dgvVolunteers_CellContentClick(object sender, DataGridViewCellEventArgs e) { string id = dgvVolunteers.CurrentRow.Cells["fldID"].Value.ToString(); this.Tag = "edit"; Volunteers volunteer = new Volunteers(id); btnSave.Tag = volunteer; txtFirstName.Text = volunteer.getFirstName(); txtLastName.Text = volunteer.getLastName(); txtNickName.Text = volunteer.getNickName(); txtNameOnId.Text = volunteer.getNameOnID(); txtMobile.Text = volunteer.getMobile(); txtEmail.Text = volunteer.getEmail(); txtStreet.Text = volunteer.getStreet(); txtCity.Text = volunteer.getCity(); txtVGL.Text = volunteer.getVGL(); txtContactNo.Text = volunteer.getVGLContact(); //cboService.Text = js.Lookup("fldEventTitle", "tblEvent", "fldID='" + volunteer.getService() + "'"); //cboWeek.Text = volunteer.getWeek(); //cboClass.Text = js.Lookup("fldGroup", "tblGroup", "fldID='" + volunteer.getClass() + "'"); chkLeading.Checked = volunteer.getLeading(); txtNFCCode.Text = volunteer.getNFCCode(); Picture = volunteer.getPicPath(); string imageFullPath = AppSettingsHelper.GetAppSettingsValue("PicturePath") + @"\volunteer\" + Picture; if (System.IO.File.Exists(imageFullPath)) { pictureBox1.Image = Image.FromFile(imageFullPath); } else { pictureBox1.Image = Image.FromFile(AppSettingsHelper.GetAppSettingsValue("PicturePath") + @"\download.jpg"); } }