Is there a way to add an item which has no text and even if that item selected it would be shown that nothing selected at all or SelectedIndex would be smaller than zero?
Is there a way to add an item which has no text and even
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, the combo box does not support this. There is no built-in logic for treating an item as non-selectable.
Sounds like you will need to either implement an owner draw combo box, or perhaps even a new control from scratch to make this work. I’m sure there are third-party controls that would do what you need as well.
Depending on what you are trying to accomplish (you didn’t provide much detail), the ListView control might also provide some options for you.