• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

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.)

   Infinite
   30
   31
    :
    :
   99999

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.
0
dominicwong
Asked:
dominicwong
  • 3
2 Solutions
 
David Johnson, CD, MVPOwnerCommented:
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.
0
 
dominicwongAuthor Commented:
Could you elaborate the meaning of 2 separate items. Thanks
0
 
dominicwongAuthor Commented:
Used a comboBox and bound it to a Dictionary.
0
 
dominicwongAuthor Commented:
Managed to resolve it by using a comboBox and Dictionary.
Thanks anyway though.
0
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now