Lookup combobox

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top