|
-
Aug 13th, 2003, 02:27 AM
#1
Thread Starter
Lively Member
Combobox.itemdata?
in VB 6
I would use the following SQL statement
select ID, Desc from X
get the results and populate a combo box.
combo.itemdata would = the ID value.
Now in .Net itemdata has been dropped.
My work around this was to add a collection for each combobox on the form then
populate that combo with the resuls from the DB, and population the combo box with the respected collection.
Is there a better method or have I completely missed the toilet seat?
Confusios say "Man who run in front of car get tired."
-
Aug 13th, 2003, 06:47 AM
#2
Sleep mode
You can directly bound the dataset obj to the combobox .
-
Aug 14th, 2003, 01:24 AM
#3
Thread Starter
Lively Member
seems like a long way round...
Heres the problem i'm facing
a simple screen layout:
Group1
[ combo1 ] [ combo2 ] [ combo3 ]
[textbox1] [textbox2] [textbox3]
Group2
[ combo1 ] [ combo2 ]
[textbox1] [textbox2]
group1
combo2 is populated after combo1.item has been selected
combo3 same as above exept uses combo2.item
group2
follows the same example as above.
When an item is selected textbox(n) is populated with the ID value.
If textbox(n).text is entered then the value in combo(n) must
reflect the correct text.
In order for me to get this right i've created 5 classes which inherit from a base interface. With all the functionality needed to complete the above mentioned problem.
Looking at your option:
How would i implement this using data binding?
Last edited by markmyb; Aug 14th, 2003 at 01:31 AM.
Confusios say "Man who run in front of car get tired."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|