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
Solved

ASP.Net GridView with horizontal scrollbar

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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

789 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