By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

dropdown list and data source

P: n/a
Hi,

I have a connection to a SQL database. One of the tables in the SQL
Database is DefendentInformation.

I would like to get the firstName and lastName fields from that table
combine them and add that as a value to the drop down list.

However, I don't know what to put in for the datasource property.

Any help would be appreciated
Brian
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

Add a new calculated column to your dataset. Use that column as the
displaymember in the dropdownlist.

Dim dc As DataColumn

'

' Add a new column in clients table which

' is full name.

dc = New DataColumn("Name")

dc.DataType = System.Type.GetType("System.String")

dc.Expression = "LastName + ', ' + FirstName"

dsClient.Tables(0).Columns.Add(dc)

Ken

--------------------
"bbdobuddy" <bb*******@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
Hi,

I have a connection to a SQL database. One of the tables in the SQL
Database is DefendentInformation.

I would like to get the firstName and lastName fields from that table
combine them and add that as a value to the drop down list.

However, I don't know what to put in for the datasource property.

Any help would be appreciated
Brian
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.