我試圖從ASP.NET控件上的數據網格中刪除邊框。該控件是動態數據網站的自定義字段模板(如果有的話)並嵌套在另一個數據網格中。問題是,無論我做什麼,它仍然具有與外部數據網格相同的邊框樣式。我試過在ASCX中設置,在代碼隱藏等等......都無濟於事。這裏的ASCX的相關部分:ASP.Net刪除(嵌套)DataGrid的邊框
<asp:DataGrid AllowSorting="true" AutoGenerateColumns="false" Enabled="true" ID="dataGrid" runat="server"
OnItemDataBound="gridView_onRowDataBound" HeaderStyle-Font-Bold="true" ItemStyle-Font-Names="courier new"
GridLines="None" CellPadding="0" CellSpacing="0" BorderWidth="0px" BorderStyle="None" ItemStyle-Font-Size="10"
ItemStyle-BorderWidth="0px" ItemStyle-BorderStyle="None" PageSize="200" AllowPaging="false" ItemStyle-Wrap="false"
AlternatingItemStyle-BorderWidth="0px" AlternatingItemStyle-BorderStyle="None">
正如你所看到的,我想盡辦法擺脫線的,他們仍然堅持。這裏是什麼樣子的圖片:
順便說一句,我只是想擺脫對網格內的網格線,外網我真的不關心。
您是否嘗試過CSS樣式?或者使用瀏覽器開發人員工具(如螢火蟲)來查找邊框樣式的來源,可能來自其他地方。 – 2009-10-05 03:19:10