Wednesday, August 11, 2010
How to merge columns (BoundFields) in a gridview?
I have an access database that has the following fields: firstName, fatherName, lastName
Now I have placed a gridview in my aspx page, and included three BoundFields, and filled the data in it. All the data are coming with the paging and sorting and everything.
Now the problem is, the names are displaying far apart of each other, for example:
Jim_____Robert_____Johnson
Mary____Luc________Johnson
(Replace ';_'; with spaces because they are not allowed in yahoo)
I want to merge the three fields because I want them to be display like:
Jim Robert Johnson
Mary Luc Johnson
I don't want to write a script to merge the three fields, because the client wants to leave the database intact.
Any ideas?
Thanks,
WassimHow to merge columns (BoundFields) in a gridview?
use query to merge fields for example:
SELECT first,second,last, first %26amp; '; '; %26amp; Second %26amp; '; '; %26amp; last as FullName
Change field names as per your table
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment