private void showdate(DataGridViewCellEventArgs e) {
dateTimePicker1.Size = vacation_transDataGridView.CurrentCell.Size;
dateTimePicker1.Top = vacation_transDataGridView.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, true).Top + vacation_transDataGridView.Top;
dateTimePicker1.Left = vacation_transDataGridView.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, true).Left + vacation_transDataGridView.Left;
if (!(object.Equals(Convert.ToString(vacation_transDataGridView.CurrentCell.Value),"")))
{
dateTimePicker1.Value = Convert.ToDateTime(vacation_transDataGridView.CurrentCell.Value);
//dateTimePicker1.Visible = false;
}
dateTimePicker1.Visible = true;
}
this code in dgv cell_click event