Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox data binding
Message
From
04/03/2005 10:30:10
 
 
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
00992721
Message ID:
00992735
Views:
17
I do get back data, this code will fill my combobox:
foreach (DataRow clientRow in dtClient.Rows)
{
   this.cboClient.Items.Add (clientRow ["Client"].ToString ());
}

this.cboClient.SelectedIndex = 0;
I think my error is with the DataSet, but I'm not sure and don't know what to look for.

>I just tried the same thing, but without the last line - I got a list to show, though it always starts at the first row in the table.
>
>I was about to ask if you were sure that your datatable had data in it, but you mentioned you were able to scan through the table and load the combo manually, so obviously you have data. You'll still need the additional line, but there may be more than one thing here...I'll look at this again.
Previous
Reply
Map
View

Click here to load this message in the networking platform