Databinding Multiselect Listbox

Databinding Multiselect Listbox

Post by VBJo » Wed, 04 Dec 2002 07:11:58



I have 'tblUsers' that holds user info, 'lstTypes' that holds user
descriptions and because each user can have more than one type, a
table BETWEEN them called tblUserTypes that holds both UserId's and
TypeID's,

tblUsers.UserID
tblUsers.UserName

tblTypes.TypeID
tblTypes.Description

tblUserTypes.UserTypeID
tblUserTypes.UserID
tblUserTypes.TypeID

I would like to have a multiselect listbox display all the available
types with just the pertinent items highlighted.

Using Databinding, I have set the Datasource, DisplayMemeber and
ValueMember properties so that the list box is correctly displaying
the entire available list from tblTypes, but I do not see how I can
now tell this listbox to select the pertinent ones from tblUserTypes.

Any help would be appreciated.

 
 
 

Databinding Multiselect Listbox

Post by Kathleen Dollar » Wed, 04 Dec 2002 10:12:57


Jon,

You won't be able to do that via binding. You will have to manually scatter
and gather the data for the multiselect combo box.

Kathleen