How to: Bind ASPxComboBox to DateTime data
The ASPxComboBox.ValueType property determines the type of the ASPxComboBox value. This property cannot have the System.DateTime value: the control does not support this value type. You should use the ASPxDateEdit component to display dates. However, there are cases when it is not suitable. For example, if a user needs to select a combo box value from multiple predefined dates, you can use one of the following techniques:
- Set the ASPxComboBox.ValueType property value to System.Int32 and use the DateTime.Ticks property of DateTime objects as values for the combo box items.
- Set the ASPxComboBox.ValueType property value to System.String and use string representations of dates instead of DateTime objects.