Combobox issue
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts
Page 1 of 1
Hi
can any one tell me how to go about this ?
I have a database with a table .. with ex. 4 people in it
ID Name
1 John
2 Peter
3 Joan
4 Sara
On my form i have 4 comboboxes that needs to be filled with the list of all names(same as you would do with databound selection)
But here is the tricky part:
If i in combobox1 choose "John" .. then the rest (3)of the comboboxes should not show "John" .. but should only show the rest of the items that are not selected at all
and if in combobox2 also choose "Sara" .. again ..then the remaining comboboxes should only list what has not been selected previously
The list for thost 2 should then just contain "Peter" and "Joan"
Any help and tips tricks ideas on this would be appreciated greatly !
Thank !!
NewGuy

can any one tell me how to go about this ?
I have a database with a table .. with ex. 4 people in it
ID Name
1 John
2 Peter
3 Joan
4 Sara
On my form i have 4 comboboxes that needs to be filled with the list of all names(same as you would do with databound selection)
But here is the tricky part:
If i in combobox1 choose "John" .. then the rest (3)of the comboboxes should not show "John" .. but should only show the rest of the items that are not selected at all
and if in combobox2 also choose "Sara" .. again ..then the remaining comboboxes should only list what has not been selected previously
The list for thost 2 should then just contain "Peter" and "Joan"
Any help and tips tricks ideas on this would be appreciated greatly !
Thank !!
NewGuy
You could probably share one event between the comboboxes for this.
If you can identify which combobox is the sender of the event, then you can change the SelectedIndex of the other 3 comboboxes until they are not equal.
If you can identify which combobox is the sender of the event, then you can change the SelectedIndex of the other 3 comboboxes until they are not equal.
mandai wrote:You could probably share one event between the comboboxes for this.Hi Mandai
If you can identify which combobox is the sender of the event, then you can change the SelectedIndex of the other 3 comboboxes until they are not equal.
I can easyli identify which combobox the sender of the event .. that will always be "combobox1" .. this one always will be there and has to be filled out .. im not sure how to go about the "selectedIndex" you mentioned .. but i will try and google that .. if you have a few lines of code flying around elaporating this that would be awsome
Thank you for taking the time to answer me

NewGuy
3 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023