我正在尝试从ASP.NET控件上的datagrid中删除边框。该控件是动态数据网站(如果有必要)的自定义字段模板,并嵌套在另一个datagrid中。问题是,无论我做什么,它仍然具有与外部数据网格相同的边界样式。我试过在ASCX中设置,在代码隐藏中设置,等等。。。都没有用。以下是ASCX的相关部分:
<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">
alt text http://nv3frg.blu.livefilestore.com/y1pUcaAqPzV0bOkyfxSM082D50DUhxXxAeUX4TvAkcak0oCGSLDa7W4kyp2BztcX61kFsyhM1pG3N7CeOE5Fd_o-z0hmi-NGGRq/untitled.bmp
顺便说一句,我只想去掉内部网格上的网格线,外部网格我并不在乎。
我建议您尝试按如下方式设置行样式边框颜色和边框样式属性:
<RowStyle BorderColor="White" BorderStyle="None" />