Is there any way to put a DateTimePicker control in the DataGridView?
I checked all the possible properties but it give option of checkbox, combo box etc, but not th
Maybe this isn't proper, but easy trick and same result........ lot less code......I was just playing around and though outside the box, just set
I hide mine until they click cell, or you can show First I declared :
DateTimePicker1.Visible = False
when you click in cell, run this code...
DateTimePicker1.Visible = True
ActiveControl = DateTimePicker1
Then below
Public Sub DateTimePicker1_ValueChanged(sender As System.Object, e As System.EventArgs) Handles DateTimePicker1.ValueChanged
requestDGV.Rows(0).Cells("requestTimeOff").Value = (DateTimePicker1.Value)
DateTimePicker1.Visible = False
DateTimePicker1.Enabled = False
End Sub
Super Basic , and i have it sitting directly in the box, doesn't look out of place
Or super easy mode.......I just like to hide mine till column click
Public Sub DateTimePicker1_ValueChanged(sender As System.Object, e As System.EventArgs) Handles DateTimePicker1.ValueChanged
requestDGV.Rows(0).Cells("requestTimeOff").Value = (DateTimePicker1.Value)
End Sub
You really just need that one line.....data will be in the grid, just a lot less code.....