Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Have a dropdown box display Field names
Message
From
12/03/2004 16:06:39
 
 
To
12/03/2004 14:55:06
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00885766
Message ID:
00885803
Views:
11
I think your error is because .ToString() is a function and you neglected to use the () ... this isn't the usual error message I've seen, but I do more stuff with WinForms and I'm assuming you're talking about the WebForm DropDownList.

~~Bonnie

>I am trying to populate a a dropdown box with the field names of a Ds to enable a user to select query Fields.
>
>so i tried to use and arraylist something like this
>
>dim lafldnames As New ArrayList
> For intColumn = 0 To dsGrid.Tables(0).Columns.Count - 1
>
>lafldnames.Add(dsGrid.Tables(0).Columns(intColumn).ColumnName.ToString)
>
>next
>
> DropDownList1.DataSource = Me.lafldnames
> DropDownList1.DataBind()
>
>
>however I get an error
>
>DataBinder.Eval: 'System.String' does not contain a property with the name dsGrid.Tables(0).Columns(intColumn).ColumnName.ToString
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