Filling ListBox with data

S

s_alexander04

Hello!

How to fill ListBox with data using DataSource, DisplayMember,
ValueMember members of ListBox?
I have DataSet and want to fill ListBox from particular table of the
DataSet.
 
P

Peter Foot [MVP]

You haven't said what language you are using but something like this would
be used in VB

ListBox1.DataSource = ds.Tables("tablename")

(or this in C#)

listBox1.DataSource = ds.Tables["tablename"];

Peter
 
S

s_alexander04

thank you

Obvious but not from help page for ListControl.DisplayMember in MSDN
and from the example on that page.
 

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

Similar Threads


Top