[newbie] combining columns in GridView

J

Jeff

Hey

asp.net 2.0

I'm wondering how 2 columns can be configured to 1 column in GridView

This is 2 columns
<asp:BoundField HeaderText="IP" DataField="IP" />
<asp:BoundField HeaderText="DNS" DataField="DNS" />

But I want it to become 1 column in the GridView, so I must find away to put
these columns together...

Any suggestions?

Jeff
 
B

Beemer Biker

Jeff said:
Hey

asp.net 2.0

I'm wondering how 2 columns can be configured to 1 column in GridView

This is 2 columns
<asp:BoundField HeaderText="IP" DataField="IP" />
<asp:BoundField HeaderText="DNS" DataField="DNS" />

But I want it to become 1 column in the GridView, so I must find away to
put these columns together...

Add another column, at the event GridView1_RowDataBound then contatenate the
two values. I suspect you can then make the other two column invisible and
only see the 3rd one.


--
=======================================================================
Beemer Biker joestateson at grandecom dot net
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
=======================================================================
 
D

David Wier

Just to add to Beemer's statement - in the other column - make it a template
column, then you can add/concatenate to your heart's content
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top