binding data to listbox (1 Viewer)

jamesmor

Registered User.
Local time
Today, 15:00
Joined
Sep 8, 2004
Messages
126
Using visual studio .net 2002, specifically VB .net I'm connecting to a database made in Access 2000.

I have Access 2003 installed on my development machine.

I've done the following:
created a simple form (1 listbox)
using the toolbox I've drug over and configured an oledb data adapter.
From this data adapter I've created a dataset.
using the properties window of my listbox i've set the datasource to my dataset
set the display member to one of the columns
set the display value the the ID column of the database.
on the form load I added the code to fill my data adapter.
when I run the app absolutely nothing is populated.

Where am I going wrong?

If i click "preview dataset" in the properties window of my dataadapter it shows the 3 records in my table just fine. I just can't figure out what else to do.
 

zaynahblaze

New member
Local time
Today, 13:00
Joined
Nov 11, 2010
Messages
4
<ListBox Name="myListBox" HorizontalAlignment="Left" SelectionMode="Extended"
Width="265" Height="55" Background="HoneyDew" SelectionChanged="myListBox_SelectionChanged"
ItemsSource="{Binding Source={StaticResource Colors}}" IsSynchronizedWithCurrentItem="true">
</ListBox>
 

Users who are viewing this thread

Top Bottom