Filling ListBox with data

  • Thread starter Thread starter s_alexander04
  • Start date Start date
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.
 
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
 
thank you

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