Solved

ASP.Net GridView with horizontal scrollbar

Posted on 2014-10-03
4
1,895 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

740 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