Click to See Complete Forum and Search --> : Buttons getting covered by DataGrid [RESOLVED]
EyeTalion
Nov 12th, 2002, 09:26 AM
I have a datagrid on my page and some buttons at the bottom that are outside of the datagrid. The problem is at run-time the buttons get covered when the datagrid gets populated. Has anyone come across this issue? Any suggestions?
thanks,
eye
Lord_Rat
Nov 12th, 2002, 10:53 AM
Sounds like you are in GRID LAYOUT and you absolutely positioned the buttons.
Switch to flow loyout in the properties pane of the page and then edit the HTML and remove the style definitions that position the buttons absolutely.
EyeTalion
Nov 12th, 2002, 12:58 PM
if I remove the style attributes, then the buttons go to the top of the page and I can't move them?
robdotnet00
Nov 12th, 2002, 03:54 PM
you need to go to the html view and positioning using html perferablly putting them into a table see if that works
EyeTalion
Nov 13th, 2002, 09:10 AM
placed them in a table but the datagrid is still overlapping the buttons...
Lord_Rat
Nov 13th, 2002, 12:09 PM
The style needs to be removed from the datagrid as well.
EyeTalion
Nov 13th, 2002, 12:40 PM
but if the style attribute isn't set in the tag, the datagrid will be placed at the top of the page
Lord_Rat
Nov 13th, 2002, 01:05 PM
Correct.
Tell you what. Could you put the code for the ASPX page here?
EyeTalion
Nov 18th, 2002, 08:50 AM
<asp:datagrid id=DataGrid1 style="Z-INDEX: 107; LEFT: 16px; POSITION: absolute; TOP: 159px" runat="server" Width="811px" Height="248px" Font-Names="Courier New" DataMember="PBSS_BID" DataSource="<%# DataSet22 %>" AutoGenerateColumns="False">
<AlternatingItemStyle ForeColor="Black" BackColor="Ivory"></AlternatingItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="Black" BackColor="LightGray"></HeaderStyle>
<Columns>
<asp:TemplateColumn SortExpression="BID_DATE" HeaderText="DATE">
<ItemTemplate>
<%# Container.DataItem ("Bid_Date").ToShortDateString()%>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="BID_ID" SortExpression="BID_ID" HeaderText="BID"></asp:BoundColumn>
<asp:BoundColumn DataField="BID_SCHEDULE_DESC" SortExpression="BID_SCHEDULE_DESC" HeaderText="DESCRIPTION"></asp:BoundColumn>
<asp:BoundColumn DataField="BUYER_NAME" SortExpression="BUYER_NAME" HeaderText="BUYER"></asp:BoundColumn>
<asp:BoundColumn DataField="EXPR1" SortExpression="EXPR1" HeaderText="POST TO WEB"></asp:BoundColumn>
<asp:TemplateColumn SortExpression="DISPLAY_START_DATE" HeaderText="DISPLAY START DATE">
<ItemTemplate>
<%# Container.DataItem ("Display_Start_Date").ToShortDateString()%>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn SortExpression="DISPLAY_END_DATE" HeaderText="DISPLAY END DATE">
<ItemTemplate>
<%# Container.DataItem ("Display_End_Date").ToShortDateString()%>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
<TABLE id="Table1" style="Z-INDEX: 108; LEFT: 16px; WIDTH: 164px; POSITION: absolute; TOP: 415px; HEIGHT: 63px" cellSpacing="1" cellPadding="1" width="164">
<TR>
<TD style="WIDTH: 76px">
<asp:button id="btnPrint" runat="server" Height="31px" Width="73px" Text="Print"></asp:button></TD>
<TD>
<asp:button id="btnMenu" runat="server" Width="72px" Height="31px" Text="Menu"></asp:button></TD>
</TR>
</TABLE>
pvb
Nov 18th, 2002, 09:23 AM
take off all of the absolute positioning styles as mentioned before and put everything you want on your page in a table, something like so:
<%@ Page language="c#"
Codebehind="Authors.aspx.cs"
AutoEventWireup="false"
Inherits=".Authors" %>
<html>
<head>
<title>Authors</title>
</head>
<body>
<form id="Authors" method="post" runat="server">
<table>
<tr>
<td><input type="button" value="A Button Above"/></td>
</tr>
<tr>
<td>
<asp:DataGrid ID="AuthorList"
Runat="server"
AllowPaging="True"
PageSize = "5"
PagerStyle-Mode="NextPrev"
PagerStyle-NextPageText="Next"
PagerStyle-PrevPageText="Prev"
PagerStyle-Position="Top"
OnPageIndexChanged="PageIndexChanged"
AutoGenerateColumns="False"
AllowSorting="True"
OnSortCommand="Sort">
<Columns>
<asp:BoundColumn DataField="au_id"
SortExpression="au_id"
HeaderText="Author ID"/>
<asp:BoundColumn DataField="au_lname"
SortExpression="au_lname"
HeaderText="Last Name"/>
<asp:BoundColumn DataField="au_fname"
SortExpression="au_fname"
HeaderText="First Name"/>
</Columns>
</asp:DataGrid>
</td>
</tr>
<tr>
<td><input type="button" value="A Button Below"/></td>
</tr>
</table>
</form>
</body>
</html>
EyeTalion
Nov 18th, 2002, 09:37 AM
that did it...thanks pvb
eye
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.