我正在ASP.Net网站上工作,并且有一个GridView显示一些数据,在OnRowDataBound
事件中,我正在根据某些条件为某些行设置行的边框。在IE中不显示ASP.Net Gridview边框
当我在本地测试我的页面时,这一切工作正常,但是当我将这些页面放入我们的母版页(这是公司内部网站的一部分)时,行边界在IE中消失,但在Firefox中显示正常。
有什么可能导致此?到目前为止,没有任何CSS样式应用,我知道,因为我设置的事件处理程序,像这样的内部边界:
e.Row.BorderStyle = BorderStyle.Solid
e.Row.BackColor = Color.FromName("#fed69c")
e.Row.BorderColor = Color.FromName("Red")
e.Row.BorderWidth = "2"
更新:
这是我在IE浏览器的开发者工具抓起CSS:
height: 12px;
border-top-color: red;
border-right-color: red;
border-bottom-color: red;
border-left-color: red;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
background-color: rgb(253, 254, 156);
我的GridView:
<asp:GridView ID="gvTickets"
runat="server"
AutoGenerateColumns="False"
DataKeyNames="TicketID"
AllowSorting="true"
DataSourceID="dsGridview"
GridLines="Horizontal"
OnRowDataBound="gvTickets_RowDataBound"
EnableViewState="True"
RowStyle-Height="12px"
Width="100%"
BackColor="White"
Font-Size="10px">
谢谢,我发布了我从IE调试中抓取的代码,并根据应用于该行的样式应该正确显示:S我也有边框宽度属性集,我只是错过了将它粘贴到我的问题中。 – Purplegoldfish