datagird高手的问题!
我用DATAGRID弄了个摸班列,里面放了表格,起代码如下,我的问题就是 当数据库有一条记录的时候,显示如下地址的图片,我的目的
是想把黄色的记录放到上面而不是现在的中间位置,我不知道设置那里》???
图片地址如下:http://210.83.20.135/soft/error.jpg
代码如下:
<Asp:DataGrid id="MyDataGrid" Font-Size="X-Small" Width="585px" BorderColor="#3366CC" BorderStyle="None" BackColor="#FFFF66" CellPadding="4" BorderWidth="1px" Height="580px" showheader="False" HorizontalAlign="Left" AllowSorting="True" PageSize="5" AutoGenerateColumns="False" Runat="Server" ForeColor="#FFFF66" AllowPaging="True">
<SelectedItemStyle Font-Bold="True" ForeColor="#CCFF99" BackColor="#009999"></SelectedItemStyle>
<ItemStyle HorizontalAlign="Center" ForeColor="#003399" BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" HorizontalAlign="Center" ForeColor="#CCCCFF" BackColor="#003399"></HeaderStyle>
<FooterStyle ForeColor="#003399" BackColor="#99CCCC"></FooterStyle>
<Columns>
<asp:TemplateColumn>
<ItemStyle Width="60px"></ItemStyle>
<ItemTemplate>
<TABLE id="Table4" style="WIDTH: 576px; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 167px; BACKGROUND-COLOR: #ffcc66; BORDER-BOTTOM-STYLE: none" height="167" cellSpacing="0" cellPadding="0" width="576" align="center" bgColor="#ffff66" border="0">
<TR>
<TD style="FONT-SIZE: x-small; WIDTH: 138px; HEIGHT: 151px" vAlign="center" align="middle" colSpan="1" rowSpan="3">
<P><A href="" border="1" width="95"></A></P>
<P>
<asp:Label id="id" runat="server"></asp:Label></P>
</TD>
<TD style="WIDTH: 376px; HEIGHT: 20px" vAlign="center"><FONT style="FONT-SIZE: x-small" color="#000000">产品名称:<%# Container.DataItem("片名") %></FONT><FONT color="black"></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 376px" vAlign="center"><FONT style="FONT-SIZE: x-small" color="#000000">产品级别:<%# Container.DataItem("等级") %></FONT></TD>
</TR>
<TR>
<TD style="WIDTH: 376px; HEIGHT: 46px" vAlign="center"><FONT style="FONT-WEIGHT: normal; FONT-SIZE: x-small; VERTICAL-ALIGN: super" color="#000000">简介:<%# Container.DataItem("简介") %></FONT></TD>
</TR>
</TABLE>
</ItemTemplate>
</asp:TemplateColumn>