Solved

ASP.Net GridView with horizontal scrollbar

Posted on 2014-10-03
4
1,719 Views
Last Modified: 2014-10-13
Hi,

I have developed a page which creates a gridview object with the number of columns determined at runtime.

The number of columns can get very large, and in this case the columns are all made narrow to fit the page, with a great deal of wrapping of text, making the table hard to follow.

Is there a way to apply a horizontal scrollbar to the gridview, so that the columns are all shown in full, and the user scrolls right to see the full width of the table?

Thanks!
0
Comment
Question by:rpm
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 40359698
Enclose the GridView inside of a <div style="overflow-x:auto;width:800px">...</div> tag.
0
 
LVL 1

Author Comment

by:rpm
ID: 40359715
I tried that, but the table inside is still rendering at the page width, rather than making itself sufficiently wide and then scrolling left/right
0
 
LVL 8

Expert Comment

by:johny_bravo1
ID: 40364125
0
 
LVL 1

Author Closing Comment

by:rpm
ID: 40377626
I managed to make this solution work with  the addition of  Wrap="False" in the GridView
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question