473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to merge columns (BoundFields) in a gridview?

Hi,

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 comming 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 it's not allowed to write alot of spaces in the texteditor)

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,
Wassim
Oct 1 '07 #1
2 1900
Check out the below links

http://datawebcontrols.com/faqs/Cust...neColumn.shtml

http://samples.gotdotnet.com/quickst...tabinding.aspx

http://www.openmymind.net/databinding/index.html
Great articles.
this one from the first article solved the problem:

SELECT ..., LastName + ', ' + FirstName AS FullName, ...
FROM Employees

Thanks.
Wassim
Oct 2 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Maarten | last post by:
Hi, I have a gridview (2.0), in the page load I remove a couple of columns from the gridview which I dont need. (All the columns are databound) This works fine. But after a postback all the...
1
by: keithb | last post by:
How can I relate data in the bound columns of a GridView control to an unbound checkbox in a template column in the same row? The checkboxes indicate which rows are to be deleted when an update...
5
by: srinivas | last post by:
Hi, I have binded a dataset to a gridview control at run time. I'm fetching 5 columns from the database. But while displaying it on the screen i want to show only 3 columns. I tried with...
1
by: =?Utf-8?B?SGFycnkgS2Vjaw==?= | last post by:
I have a GridView that I dynamically add columns to in code. The way that my code is written, everything works properly if I use GridView.Columns.Add to simply add the columns to the end of the...
0
by: jencus | last post by:
I have created a gridview dynamically, now my need is that i have to merge the first row of the gridview according to the a specific condition in the second row say i have 11 columns , in that...
3
by: Michel Esber | last post by:
Hi all, DB2 V8 LUW FP 15 There is a table T (ID varchar (24), ABC timestamp). ID is PK. Our application needs to frequently update T with a new value for ABC. update T set ABC=? where ID...
4
by: Bobby Edward | last post by:
In my gridview control I want to UNCHECK "Auto-generate fields". My table has like 30 fields. Do I have to MANUALLY add the BoundField's ONE at a time??? Or is there an easier way? Thanks...
2
by: Ralf | last post by:
I have a custome request to print a gridview with lots of columns, 31 to be exact. I know how to print out a gridview, done it already for a GV with 6 columns. But, this GV is very wide and will...
14
by: santoshkakani | last post by:
Hi friends i can any one help me merging 2 random tables into one and displaying in gridview for example table 1 Sid SName Dno and table 2 Dno Dname Daddress
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.