[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to add a horizontal scrollbar to ASP.NET Table webcontrol?

Posted on 2007-07-30
3
Medium Priority
?
1,666 Views
Last Modified: 2011-10-03
Hello,
I need to add a horizontal scrollbar to this ASP.NET table because it is too wide. Please help. Thanks.
<asp:table id="resultTable"
                  style="Z-INDEX: 105; LEFT: 16px; POSITION: absolute; TOP: 256px"
              runat="server"
                  GridLines="Both"
                  CellPadding="0"
                  CellSpacing="0"
                  BorderWidth="1px"
                  CaptionAlign="Top"
                  EnableViewState="False"
                BackColor="White"
                  BorderColor="Black"
                  BorderStyle="Solid">
</asp:table>
0
Comment
Question by:engg
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
steveberzins earned 1500 total points
ID: 19596182
how about just put it in a div ...

<div style="overflow:auto;">
<asp:table id="resultTable" ... >
</asp:table>
</div>

if you only want a horizontal scrolly, style="overflow-x:visible;" style="overflow-x:auto;" or style="overflow-x:scroll;"
0
 

Author Comment

by:engg
ID: 19600470
Thanks.
It doesn't seem to work.
I set the width of this table to '200px' (Its actual width is much more than that)  to see if it works.
This table doesn't contain any cell when the Page_Load starts. I add rows and cells to this table one by one depending on how big the data is.
0
 

Author Comment

by:engg
ID: 19620036
I added a few more fields to the style attribute and it works.
"Z-INDEX: 101; LEFT: 52px; OVERFLOW-X: auto; WIDTH: 920px; POSITION: absolute; TOP: 256px; HEIGHT: 450 px"
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Suggested Courses

829 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