[newbie] combining columns in GridView

  • Thread starter Thread starter Jeff
  • Start date Start date
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
 
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
=======================================================================
 
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
 
Back
Top