Populate ComboBox with list of Years for DOB
Hi guys, im creating my own control to replace the Date Calender within 2008. I want to return a list of Years into a combobox for the user to select.
Im aware i can manually add these years but ideally i would like to return a list just like the calender control.
Any ideas where to start?
thanks:thumb:
Re: Populate ComboBox with list of Years for DOB
You can use the Date Time Picker, and:
1. set the Custom Format > yyyy
2. set the Format > Custom
3. set ShowUpDown > True
And there you have it... Not a ComboBox but maybe it help you...
Re: Populate ComboBox with list of Years for DOB
Thanks, that helps alot. But would still like to know if its possible to put the list in a combo box
Re: Populate ComboBox with list of Years for DOB
Yes it is.
You can accomplish data with several ways, for example you can use a loop and add the years that you want into the combo box...