Lookup combobox

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

VS.2005

I have several lookup combo boxes in my windows project and would like to do
a "lighter weight" binding. Currently I am using a strongly typed dataset
with a binding source as the DisplayMember and ValueMember. This seems like
overkill since I don't use much of the datatable functionality.

An example is with a customer order to show the Termsnum (Int32) as the
TermsTable.Desciption (string).

I was looking at a bindingList(of T) for this, but I'm not sure if this is a
good choice. Before I start creating this, can someone advise?

Thanks,

Rick
 
Hi Rick,

What I do is write a custom class to store the minumim data I need, and
override the ToString() function, I then create a collection of these classes
and bind the Collection as the DataSource.

To get the selected item is a simple matter of :

Dim MyClassItem As CustomClassItem = CType(MyComboBox.SelectedItem,
CustomClassItem)

HTH
 
Back
Top