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

  • Thread starter Thread starter jobi
  • Start date Start date
J

jobi

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
 
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
 
Thanks for the solution.

jobi
Rajesh Patel said:
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
 
Back
Top