Solved

ASP.Net GridView with horizontal scrollbar

Posted on 2014-10-03
4
1,572 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Log4Net custom Appender not being fired. 5 44
System32Int Error 8 44
VB.NET HttpWebRequest 12 32
Problem to page 4 23
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now