By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,682 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,682 IT Pros & Developers. It's quick & easy.

HOWTO get info from the other colums of the dataset-table used as datasource for a combobox ?

P: n/a
Hi,

I have this combobox which has a table from a dataset as datasource.

When I click an item on the combobox-list , I would like to display (in
textfield) the value from an other column that is present in the table but
is not the ID-column that is connected to toe combobox.datavalue.

How can I do this ?

TIA,
jobi
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
you can write in the combobox selectedindexchanged event.

' assume dataview1 is your datasource for your combobox.
messagebox.show (dataview1(combobox1.selectedindex)("othercolumn") )
as your combobox is binded with some datasource, combobox's selectedindex
property virtually represents the row position of the datasource.
However, it's not necessary to write dataview1 directly in your code. you
can extract it through currencymanager.

Rajesh Patel
"jobi" <jo**@reply2.group> wrote in message
news:bm**********@reader08.wxs.nl...
Hi,

I have this combobox which has a table from a dataset as datasource.

When I click an item on the combobox-list , I would like to display (in
textfield) the value from an other column that is present in the table but is not the ID-column that is connected to toe combobox.datavalue.

How can I do this ?

TIA,
jobi

Nov 20 '05 #2

P: n/a
Thanks for the solution.

jobi
"Rajesh Patel" <rd****@hotmail.com> wrote in message
news:uf**************@TK2MSFTNGP09.phx.gbl...
you can write in the combobox selectedindexchanged event.

' assume dataview1 is your datasource for your combobox.
messagebox.show (dataview1(combobox1.selectedindex)("othercolumn") )
as your combobox is binded with some datasource, combobox's selectedindex
property virtually represents the row position of the datasource.
However, it's not necessary to write dataview1 directly in your code. you
can extract it through currencymanager.

Rajesh Patel
"jobi" <jo**@reply2.group> wrote in message
news:bm**********@reader08.wxs.nl...
Hi,

I have this combobox which has a table from a dataset as datasource.

When I click an item on the combobox-list , I would like to display (in
textfield) the value from an other column that is present in the table

but
is not the ID-column that is connected to toe combobox.datavalue.

How can I do this ?

TIA,
jobi


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.