|
-
Nov 12th, 2002, 10:26 AM
#1
Thread Starter
Frenzied Member
Buttons getting covered by DataGrid [RESOLVED]
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
Last edited by EyeTalion; Nov 18th, 2002 at 10:38 AM.
-
Nov 12th, 2002, 11:53 AM
#2
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.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Nov 12th, 2002, 01:58 PM
#3
Thread Starter
Frenzied Member
if I remove the style attributes, then the buttons go to the top of the page and I can't move them?
-
Nov 12th, 2002, 04:54 PM
#4
Lively Member
you need to go to the html view and positioning using html perferablly putting them into a table see if that works
"All those who wonder are not lost" -j.r.r tolkien
-
Nov 13th, 2002, 10:10 AM
#5
Thread Starter
Frenzied Member
placed them in a table but the datagrid is still overlapping the buttons...
-
Nov 13th, 2002, 01:09 PM
#6
The style needs to be removed from the datagrid as well.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Nov 13th, 2002, 01:40 PM
#7
Thread Starter
Frenzied Member
but if the style attribute isn't set in the tag, the datagrid will be placed at the top of the page
-
Nov 13th, 2002, 02:05 PM
#8
Correct.
Tell you what. Could you put the code for the ASPX page here?
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Nov 18th, 2002, 09:50 AM
#9
Thread Starter
Frenzied Member
<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>
-
Nov 18th, 2002, 10:23 AM
#10
Hyperactive Member
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:
Code:
<%@ 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>
-
Nov 18th, 2002, 10:37 AM
#11
Thread Starter
Frenzied Member
that did it...thanks pvb
eye
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|