Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0 ASP:NET
Hi guys, i have been hitting my head on the desk trying to figure this out, i have a table [EmployeeInfo] that contains all the employee information [like firstnae, lastname, middlename and dob] of the employee. What i want to do is display a gridview that will be having 5 column. The first column will be the EmployeeId, second column will be the concatenation of the employee's [firstname lastname and middle name], the third column will be the employee nationality and the last two will be a column that displays an image that represent [update] and [delete].
 
Any clue on how to go about this.
 
Thanks
Posted 25-Feb-13 23:38pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

hi,
 

try this query,
 
Select EmployeeID as EmployeeID, FirstName + ' ' + LastName + ' ' + MiddleName as Name, Nationality from EmployeeInfo
 

Make sure whether firstname, lastname and middlename should varchar,char,nvarchar etc., should not numeric types.
 

Regards,
Prakash.T
  Permalink  
Comments
ahmedfaruk88 at 26-Feb-13 5:33am
   
Thank you very much Prakash.
ahmedfaruk88 at 26-Feb-13 6:48am
   
Really sky is not the limit when it comes to learning. Please any reference to where i can get a guide on how to replace the insert, update and delete in a gridview with an image
Prakash Thirumoorthy at 26-Feb-13 7:05am
   
have u used ajax ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 26 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100