Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.CalendarCombo
Private Sub AllowNullValues(ByVal allow As Boolean)
If (allow) Then
' Set AllowNull to true
Me.ultraCalendarCombo1.AllowNull = True
' Set the NullDateLabel to "(no date selected)", which the control
' will display when the Value property is set to null
Me.ultraCalendarCombo1.NullDateLabel = "(no date selected)"
Else
' If the Value property is null, we can't set AllowNull to false,
' or an exception will be thrown. When that is the case, change
' the Value to the current date.
If Me.ultraCalendarCombo1.Value Is Nothing Or Me.ultraCalendarCombo1.Value Is DBNull.Value Then
Me.ultraCalendarCombo1.Value = DateTime.Today
' Now set the AllowNull property
Me.ultraCalendarCombo1.AllowNull = False
End If
End If
End Sub