Need advice to display selections: Infinite, 30 to 99999

Hi experts
I would like some advice on a proper way to display in Winform the following:
They need to be data-bound to an object such that "Infinite" is represented by integer '0', "30" as '30', etc. (ie. 1...29 are prohibited.)


I guess I have two options: comboBox or domainUpDown.
Is it possible that when user types "I" or "i", then "Infinite" shows up immediately?

Thanks in advance.
Who is Participating?
dominicwongConnect With a Mentor Author Commented:
Used a comboBox and bound it to a Dictionary.
David Johnson, CD, MVPConnect With a Mentor OwnerCommented:
What you need and what you display are 2 separate items.  
0 will display 0 unless you override it and tell it to display infinite.. you also need to do the converse if the user enters Infinite then you pass back to the backend a 0.  You also need data validation to ensure the range of 1-29 is excluded.. or returned back to the user as an error.
dominicwongAuthor Commented:
Could you elaborate the meaning of 2 separate items. Thanks
dominicwongAuthor Commented:
Managed to resolve it by using a comboBox and Dictionary.
Thanks anyway though.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.