[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Selection driven combos

Posted on 2006-11-15
2
Medium Priority
?
240 Views
Last Modified: 2010-04-16
Hi,

I have 2 c# winform dot net 1.1 combo's. Both are data bound to the results of a SQL select statement executed on my sybase database. What I want to do is implement functionality where by selecting one of the values in combo1 forces the selected index of combo2 to be changed and display a different value by default, but allow the user to edit the selected index of combo 2 if need be.

Is this possible. As ever your help is really appreciated.

Thanks
0
Comment
Question by:bowemc
[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
2 Comments
 
LVL 15

Accepted Solution

by:
ozymandias earned 220 total points
ID: 17948186
create a method like this :

private void comboBox1_SelectedIndexChanged(object sender, System.EventArgs e) {
     // set the selected index of comboxbox2 to what ever you like here
}

and bind it to the selectedInbdexChanged event like this :

this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
0
 
LVL 15

Expert Comment

by:ozymandias
ID: 17948197
Using the above, whenever the selected index of comboxbox1 chnages the method will be called and you can set the selectedindex of combobox2 accordingly.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

649 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