Gridview中的HyperlinkField未显示链接的蓝色下划线

时间:2010-10-03 12:44:52

标签: asp.net gridview asp.net-3.5

我在Gridview控件中有一个超链接字段。我正在使用下面显示的gridview样式表。 但由于某些原因,gridview中的hyperlinkField列不是蓝色,并且没有下划线。

如何将超链接显示为常规超链接,如蓝色和下划线?

由于

/* table style */
table.BlueGridView
{

    font-family:helvetica,arial,sans-serif;
    border:solid 1px #7aa5d6;

    text-align: left;
    font-size: 10pt;

    /*position:fixed; */
    display:inline-block;
    vertical-align: baseline;
    direction: ltr;
    letter-spacing: normal;
}

/* header cell style */
.BlueGridView th
{
    color:#3366cc;
    border-right-color:#7aa5d6;
    border-bottom-color:#7aa5d6;
    background:#e5ecf9;
}  

/* cell styles */
.BlueGridView td
{
    border-bottom-color:#e5ecf9;    
    border-right-color:#e5ecf9; 
}

/* mouseover row style */
.BlueGridView .row-over 
{ 
    background-color:#e5ecf9;
}
/* Alternating Row Color */
.BlueGridView .alt-data-row 
{ 
    background-color:#e5ecf9;
    font-weight:normal;
    font-family:Verdana;
    font-size:small; 

}

.BlueGridView .data-row
{
    font-weight:normal;
    font-family:Verdana;
    font-size:small; 
}

.BlueGridView .selected-row
{
    background-color:Blue;  
}

/* GridView Header */
.BlueGridView .header-row
{
    color: #000080;
    font-weight: bold;
    text-align:center; 
    /* position:relative; */



}

/* mouse select row style */
.BlueGridView .row-select 
{ 
    background-color:#7aa5d6;
    color:#fff;
}

1 个答案:

答案 0 :(得分:1)

如果没有看到整个样式表和GridView代码,这是我能给你的最佳答案。

.BlueGridView * a
{
    text-decoration:underline !important;
    color: #0000F5 !important;
}

这会影响.BlueGridView中的所有标签...所以如果你有其他超链接,那么选择器就更具体了。