how to get date from data grid view into datetime picker by clicking on cell ??
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0)
{
DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex];
textId.Text = row.Cells["Appointment ID"].Value.ToString();
textMobileNumber.Text = row.Cells["Mobile Number"].Value.ToString();
// Problem in this line --> dtpAppointmentdate.Text = row.Cells["Appointment Date"].Value.ToString();
comboAppointmentTime.SelectedText = row.Cells["Appointment Time"].Value.ToString();
comboAppointmentTime.Text = row.Cells["Appointment Time"].Value.ToString();
}
}