Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi
I have four comboBoxes each with same 6 Items { item1, item2, item3, item4, item5, item6}
also I read from a file first 10 rows using stream reader
I assigned the values of some rows to each particular item.

Lets say that line 4 contains the value of item 3
and line 9 contains the values of item 1
line 5 contains the value of item 6

then If I selected item 3 from Cb1
and item 9 from cb2
and item 6 from cb3

then the output should be written to a text box with the values of: line4, line 9 line 5 respectively.
Posted
Comments
Mahesh Bailwal 25-Aug-13 9:09am    
where you got stuck?
netfed 25-Aug-13 9:38am    
What do you mine by Line (Lets say that line 4 contains the value of item 3). What is a Line in this context?
Sergey Alexandrovich Kryukov 25-Aug-13 17:24pm    
First of all, why do wanted to get such reordering in first place? And what's the problem?
—SA
syed shanu 25-Aug-13 23:15pm    
In your question you have clear answer.In each Combo Selected Index change call a function and pass your combo selected items and from file check for the combo selected item in each record and concatenate all the result and display the final result in your text box.
BillWoodruff 26-Aug-13 1:28am    
Are you saying the each of the four ComboBoxes contains unique entries for each of its Items ?

It's also important to clarify exactly whether you are adding instances of Objects (like instances of Classes) to the ComboBox's Item collection (where those Objects have the feature that 'ToString() is over-ridden, or they, in some way, return the string that the ComboBox needs to display for each item so that you can distinguish item from item. I'm going to assume, for now, that you are inserting instances of objects, not just strings.

Finally, you need to let us know how the TextBox, in which you want the selections in the ComboBoxes displayed, is updated: when the user presses a button, or automatically, or ... ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900