Greetings,
I have created a datatimepicker control in a datagridview (via which functions fine and has a mindate and maxdate set.
I want to adapt this for a datetimepicker with format HH:mm.
I have done this and it functions to a degree.
However if I tried to add the mindate/maxdate the error occurs Exception has been thrown by the target of an invocation." when editing the control
Small section of code regarding editing is
Full code for the control is
Can anyone please assist Im out of my depth when creating such a complex control, im drowning!! :-(
Thanks
Rob
I have created a datatimepicker control in a datagridview (via which functions fine and has a mindate and maxdate set.
I want to adapt this for a datetimepicker with format HH:mm.
I have done this and it functions to a degree.
However if I tried to add the mindate/maxdate the error occurs Exception has been thrown by the target of an invocation." when editing the control
Small section of code regarding editing is
Code:
Class TimeEditingControl
Inherits DateTimePicker
Implements IDataGridViewEditingControl
Private dataGridViewControl As DataGridView
Private valueIsChanged As Boolean = False
Private rowIndexNum As Integer
Public Sub New()
Me.Format = DateTimePickerFormat.Time
Me.MinDate = New Date(Now.Year, Now.Month, Now.Day, 8, 0, 0)
Me.MaxDate = New Date(Now.Year, Now.Month, Now.Day, 17, 0, 0)
End Sub
Full code for the control is
Can anyone please assist Im out of my depth when creating such a complex control, im drowning!! :-(
Thanks
Rob