[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

Is it possible to make gridviews display 2 rows instead of 1 per entry?

I'm using visual studio 2005 and I want to have a grid view that is multiple rows because otherwise the gridview is just too long and goes off the page. Is it possible to do so?

1 Solution
One possible solution is to have a single column gridview, and convert the column to a template field.
Then you could create a two-row table in the template field.
The main downside is that it limits your sorting ability for each column.

Psuedo code:
<asp:Gridview id="gvExample" runat="server" ...>
                   <table cellpadding="4" width="100%">
                           <td> row one stuff </td>
                           <td> row two stuff </td>

Open in new window

renet123Author Commented:
I actually had considered doing that, but I really don't want to lose sorting. I was hoping there was a way to display both titles of the columns in the header and each is clickable and sortable. Know what I mean? Any help or if it's just not possible, please let me know.


Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now