Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

c# validation on combo boxes

Posted on 2014-01-12
2
Medium Priority
?
255 Views
Last Modified: 2014-03-18
Hi,

I have 4 combo boxes

the default value is "-- Please Select --", i want a validation that says

1) Only one can be set NOT to  "-- Please Select --" the rest 3 have TO be set to  "-- Please Select --"

Please help

Thanks

R8vI
0
Comment
Question by:R8VI
2 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 39774693
I think you should look for some control alternative like this:
a combo box with a "tree-view" like display
http://www.brad-smith.info/blog/archives/104
will be easier for the user, I would say?
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 2000 total points
ID: 39775052
Dim count As Integer

            count = CInt(ComboBox1.Text = "-- Please Select --")
            count += CInt(ComboBox2.Text = "-- Please Select --")
            count += CInt(ComboBox3.Text = "-- Please Select --")
            count += CInt(ComboBox4.Text = "-- Please Select --")

            If count <> -3 Then
                  MessageBox.Show("Bad")
            End If
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Integration Management Part 2
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question