Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Two merged columns in GridView

Reply
Thread Tools

Two merged columns in GridView

 
 
craigkenisston@hotmail.com
Guest
Posts: n/a
 
      06-14-2006
I'm not sure if I'm asking something irreverent, so I'm sorry in
advance.
But I have a report that should look like :

Col1 Col2 Col3 Col4
1 XYZ YUI FIRST_DATA_ASDFASDF
SECOND_DATA_ASDFASDF
2 UYI JLU FIRST_DATA_ASDFASDF
SECOND_DATA_ASDFASDF

What I mean, is that "first_data" is a column in the database.
"second_data" is another column in the database, but they are near 400
char longs and for presentation I was asked to have both on the same
column, one below the other.
Is this possible with Gridview ? If so, how ?

 
Reply With Quote
 
 
 
 
Winista
Guest
Posts: n/a
 
      06-15-2006
There is no direct solution for this problem but can be done. It will
require little bit of trick.


0. Have the grid set up for your 4 column but change third column to header
something like Column3   column4. This will give user illusion
that the column is not one column but two.
1. Handle RowCreated event for the grid.
2. In the handler, append the text of 4th column with text of 3rd column but
add <br> tag after 3rd column's text. And at the same time remove the fourth
column from cell collection.

Give it a try. It should work.

Winista
http://www.universalshoppingmall.com

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> I'm not sure if I'm asking something irreverent, so I'm sorry in
> advance.
> But I have a report that should look like :
>
> Col1 Col2 Col3 Col4
> 1 XYZ YUI FIRST_DATA_ASDFASDF
> SECOND_DATA_ASDFASDF
> 2 UYI JLU FIRST_DATA_ASDFASDF
> SECOND_DATA_ASDFASDF
>
> What I mean, is that "first_data" is a column in the database.
> "second_data" is another column in the database, but they are near 400
> char longs and for presentation I was asked to have both on the same
> column, one below the other.
> Is this possible with Gridview ? If so, how ?
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which files and folders from the two solutions must be merged to combine web sites solutions Cal Who ASP .Net 0 06-08-2010 11:20 PM
template columns and bound columns in gridview Vinki ASP .Net Web Controls 2 04-25-2007 04:22 PM
Align table columns with gridview columns Jacksm ASP .Net 2 11-21-2006 09:49 PM
Javascript two fields merged to one hidden field Microsoft_Public ASP .Net 3 12-14-2005 02:35 PM
Query: Can two pdf files be merged? Griff Computer Support 1 04-14-2004 12:10 PM



Advertisments