Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiple fields in datagrid column 1

Status
Not open for further replies.

mattbold

Programmer
Oct 5, 2001
45
0
0
GB
hello,

just a quick question :)
how do i go about putting two fields in one column in a datagrid? for example i would like to have a column called name, and in there there will be both the first and last names of a person..?

at the moment the datagrid is getting its data using a datareader..

cheers,
matt
 
Try this:
select (FirstName + ' ' + LastName) as 'Name' from tblEmployees

Use 'Name' in Datagrid binding.
 
good thinking my man!

i had totally forgotten about doing stuff in the SQL beforehand!

- matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top