Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fill a list view
Message
From
15/07/2005 19:31:39
 
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 1.1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01033186
Message ID:
01033237
Views:
18
Well, I'm glad you figured it out. You didn't mention that you had set the DataSource to the DataSet instead of to the DataTable or DataView. Yeah, that won't work that way unless you do the DisplayMember differently:
-- assuming that the TableName property for the DataTable in MyDataSet has been set to "MyTable"
-- either manually, or when using the .Fill() method:

listBox1.DataSource = MyDataSet;
listBox1.DisplayMember = "MyTable.MyColumn";
~~Bonnie



>Solved the problem:
>
>listBox1.DataSource=search.Tables[0].DefaultView;
>
>indstead of
>
>listBox1.DataSourse = search
>
>
>Thanks for the help.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform