Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adjust space size around datagrid borders

Status
Not open for further replies.

Ankor

Programmer
Mar 21, 2002
144
US
I have a datagrid that is bigger than screen size, so I have vertical and horizontal scroll bars. My problem that the screen "eats" right and bottom datagrid borders. Is there any easy way to solve this problem?
 
It's a normal regular datagrid where right and bottom borders are not visible as if they were behind PC screen.
 
<asp:datagrid id="dgList" ShowFooter="True" OnItemDataBound="spanfooter" style="Z-INDEX: 103; LEFT: 8px; POSITION: absolute; TOP: 104px" runat="server" Width="100%" Font-Names="Arial" Font-Size="XX-Small" BorderColor="#8080FF" BorderStyle="Solid" AutoGenerateColumns="False">
<HeaderStyle Font-Size="X-Small" Font-Names="Arial" Font-Bold="True" HorizontalAlign="Center" ForeColor="Navy" BorderColor="Blue" VerticalAlign="Middle" BackColor="#C0C0FF"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="Department" ReadOnly="True" HeaderText="Department"></asp:BoundColumn>
<asp:BoundColumn DataField="Description" ReadOnly="True" HeaderText="Description"></asp:BoundColumn>
<asp:BoundColumn DataField="Location" HeaderText="Location"></asp:BoundColumn>
<asp:BoundColumn DataField="Director" ReadOnly="True" HeaderText="Director"></asp:BoundColumn>
<asp:BoundColumn DataField="Director ID" ReadOnly="True" HeaderText="Director ID"></asp:BoundColumn>
<asp:BoundColumn DataField="Director Address" ReadOnly="True" HeaderText="Director Address"></asp:BoundColumn>
<asp:BoundColumn DataField="Manager" ReadOnly="True" HeaderText="Manager"></asp:BoundColumn>
<asp:BoundColumn DataField="Manager ID" ReadOnly="True" HeaderText="Manager ID"></asp:BoundColumn>
<asp:BoundColumn DataField="Manager Address" ReadOnly="True" HeaderText="Manager Address"></asp:BoundColumn>
<asp:BoundColumn DataField="Last Updated" ReadOnly="True" HeaderText="Last Updated"></asp:BoundColumn>
<asp:BoundColumn DataField="Effective Date" ReadOnly="True" HeaderText="Effective Date"></asp:BoundColumn>
</Columns>
</asp:datagrid>
 
What is rendered HTML? Code I see in view/source?
 
I can only show it without data:

<table cellspacing="0" rules="all" bordercolor="#8080FF" border="1" id="dgList" style="border-color:#8080FF;border-style:Solid;font-family:Arial;font-size:XX-Small;width:100%;border-collapse:collapse;Z-INDEX: 103; LEFT: 8px; POSITION: absolute; TOP: 104px">
<tr align="Center" valign="Middle" style="color:Navy;background-color:#C0C0FF;border-color:Blue;font-family:Arial;font-size:X-Small;font-weight:bold;">
<td>Department</td>
<td>Description</td>
<td>Location</td>
<td>Director</td>
<td>Director ID</td>
<td>Director Address</td>
<td>Manager</td>
<td>Manager ID</td>
<td>Manager Address</td>
<td>Last Update</td>
<td>Effective Date</td>
</tr><tr>
<td>0001</td>
<td>Test Description</td>
<td>Florida</td>
<td>John Smith</td>
<td>ABC123</td>
<td>Test Address</td>
<td>Mary Brown</td>
<td>DEF456</td>
<td>Another test address</td>
<td>06/04/07</td>
<td>01/12/05</td>
</tr>
</table>
 
I can't see anything wrong with that code when I run it in my browser (FireFox 2.0.0.4 and IE7). Maybe you could provide the full code for the page (feel free to remove sensitive data) including the DOCTYPE you are using and the browser you are having the issue with. It may also be more appropiate to ask the question in the HTML forum.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
I created a simple HTML page and pasted only this part of code into it. I also had to add six more generic columns to make the table bigger than the screen on my PC, and I got the same problem - right border is not visible. I am using IE 6.0.2900.2180. I cannot understand why it is happening, but maybe you are right about HTML forum.
Thank you for your help anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top