Mark Neil Abian

Mark Neil Abian

  • NA
  • 27
  • 10.9k

I want to display the data into the text boxes to update the data.

Feb 2 2022 2:52 AM

I want to display the data into the text boxes to update the data. but when i try to select the data to update or edit, But I got this error "String was not recognized as a valid DateTime" this is my code below.

private void dgv_Member_RowHeadMouseClick(object sender, DataGridViewCellMouseEventArgs e)
memberid = Convert.ToInt32(dgv_Member.Rows[e.RowIndex].Cells[0].Value.ToString());
dtpBDate.Text = dgv_Member.Rows[e.RowIndex].Cells[12].Value.ToString();
dtpMembership.Text = dgv_Member.Rows[e.RowIndex].Cells[22].Value.ToString();

I think that code is the main problem.

 

 


Answers (3)