2012-01-18 65 views
0

我正在使用具有相同值的許多行的GridView,因此我使用[GridViewHelper類] [1]對這些行進行了分組。現在我想解決這個熒光筆,因爲當它的第一行,它突出了第一個單元格如下圖所示的快照: enter image description here如何修復GridView中有一些分組行的熒光筆?

但是,如果它進入到第二排,它不突出顯示第一個單元格如下圖所示的快照: enter image description here

爲高亮的CSS代碼是:

.grid .datatable .row:hover 
{ 
    background-color:#fffacd; 
    color:#000; 
} 

我還有以下JQuery的使用,它做同樣的事情,CSS:

<!-- This Jquery is for highlighting any table, gridview and whatever --> 
     <script type="text/javascript"> 
      $(document).ready(function() { 
      $("tr").filter(function() { 
      return $('td', this).length && !$('table', this).length 
      }).css({ background: "ffffff" }).hover(
      function() { $(this).css({ background: "#C1DAD7" }); }, 
      function() { $(this).css({ background: "#ffffff" }); } 
      ); 
      }); 
     </script> 
     <!-- End --> 
    [1]: http://www.agrine 

i.com/gridviewhelper/gridviewhelper_en.htm

回答

0

它,S bovios因爲第一個單元格屬於第一row.Your第一排有5個單元,但第二個有你想突出這種風格,你應該4 cell.If使用JavaScriptjQueryjQuery或任何其他客戶端語言。您應該在鼠標移過一行時檢查單元格的數量,然後以適當的方式突出顯示它們。

+0

感謝您的幫助,但即使使用JQuery,我也有同樣的問題。 – user1093651 2012-01-18 07:09:01