Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

c# validation on combo boxes

Posted on 2014-01-12
2
Medium Priority
?
254 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

721 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