(Joshua)
7/18/2002 9:34:00 PM
Hi All ~ I'm having trouble binding a listbox in C# (my first C#
project). Any help would be appreciated:
So my listbox initializes like this:
this.listBox1 = new System.Windows.Forms.ListBox();
And my databinding code is like this:
listBox1.DataSource = MyDS.Tables["Notes"].DefaultView;
But there isn't a "DataText" property for my list box. I think what I
need is the C# equivalent of listBox1.DataText = "NoteText" (that's
what I'd write in VB), but there's nothing. My listbox simply lists
"System.Data.DatarowView" for each record.
This must be simple....what am I doing wrong?
Thanks,
Josh