challengeAccepted
challengeAccepted

Reputation: 7620

Columns organized in 2 different rows for each record(row) in GridView

I have a huge Gridview bigger than the size of a webpage. So i don't know if i can create a gridview with a set of columns in 1 row and the rest of the columns underneath the above ones. This will be for each row. This is using c# in ASP.Net.

For example: FirstName LastName Address City State Phone etc etc in 1st row for 1st employee then in the same row of a gridview, i want to show his family details or soemthing.

Same thing goes for the next employee

Is it really possible?

Upvotes: 0

Views: 870

Answers (3)

farshad saeidi
farshad saeidi

Reputation: 605

use Repeater :D

put one main div for each record

for example if you want to have 2 record in 1 row , use 50% width (in real world 49%) or use 32% if you need 3 record

Upvotes: 0

Hugo Trudel
Hugo Trudel

Reputation: 225

use the style property, set a width and height (instead of using teh asp.net property) and add teh css property overflow:auto;

basically, it should look like this

<div style="width:1000px; height: 800px; overflow:autol;">
//gridview here
</div>

That will make sure that, if your gridview is bigger than the set height and width, a scrollbar will be made. Not the best way to show a gridview, but the best way I know to show a gridview too big for the screen size. Also, it will be easier on the

Upvotes: 0

Abdusalam Ben Haj
Abdusalam Ben Haj

Reputation: 5433

Not a beautiful answer but you could have two GridViews, One above and one below. Handle the OnSelectedIndexChanged of the first GridView to show the details in the second GridView

Upvotes: 1

Related Questions