【发布时间】:2009-10-06 17:48:51
【问题描述】:
我在这里的 GridView 遇到了一些困难,客户要求我在单元格之间放置一些空间,通常我会做 CellSpacing="5" 但它似乎不起作用,我尝试了一些东西,一切正常重写...
我试过的代码:
<asp:GridView ID="gvShoppingCart" runat="server" CellSpacing="5" Width="100%" AutoGenerateColumns="false">
<some-formating-columns-here />
</asp:GridView>
实际渲染的是:
<table cellpadding="0" cellspacing="0" summary="">
<thead>
<tr class="AspNet-GridView-Header">
<th scope="col">Produit</th>
<th scope="col"> </th>
<th class="Center" scope="col">Quantité</th>
<th class="Right" scope="col"> Prix Unitaire </th>
<th class="Right" scope="col">Prix</th>
</tr>
</thead>
<body-columns-here />
</table>
我现在不知道要添加什么...
有什么建议吗?
【问题讨论】:
-
您能否确认您使用的是哪个版本的 ASP.NET 框架,以及您在哪个浏览器中看到了这种行为?另外,您是否定义了任何控制适配器? (您应该检查 /App_Browsers 文件夹中的 .browser 文件)。