下面的代码运行良好,但列非常靠近。有没有办法设置每列的宽度?另外,有没有办法缩进整个“pnlChildView”?
谢谢,
<asp:DataList BackColor="#ffffff" id="DataList1" DataSourceID="dsCompanyList"
runat="server" Width="100%" DataKeyField="Company"
UseAccessibleHeader="true" CssClass="books"
HeaderStyle-CssClass="header" ItemStyle-CssClass="item"
AlternatingItemStyle-CssClass="alternating">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" Text="+"
CommandArgument='<%#Container.ItemIndex%>'
OnCommand="LinkButton1_Command"
Font-Underline="false">
</asp:LinkButton>
<%#Eval("Row")%>
<%#Eval("Company")%>
<asp:Panel ID="pnlChildView" runat="server" style="margin-right:50px;">
<asp:DataList ID="childList" runat="server" Width="100%">
<ItemTemplate>
<tr>
<td><%#Eval("FirstName")%></td>
<td><%#Eval("LastName")%></td>
</tr>
</ItemTemplate>
</asp:DataList>
</asp:Panel>
</ItemTemplate>
</asp:DataList>