2016-11-29 65 views
0

我的項目中有一個gridview,有時它可能沒有數據顯示。因此,我將ShowHeaderWhenEmpty屬性設置爲true,以便在沒有包含數據時顯示錶頭。如果表格爲空,如何將表格標題顯示爲標籤?

問題是它創建一個表格,顯示tbody標籤中的表格標題。

<table XXXXXX > 
    <tbody> 
    <tr> 
     <td>header A</td> 
     <td>header B</td> 
    </tr> 
    </tbody> 
</table> 

而我期望表的結構:

<table XXXXXX > 
    <thead> // The table header shows in thead tag 
    <tr> 
     <th>header A</th> 
     <th>header B</th> 
    </tr> 
    </thead> 

    <tbody> 
    </tbody> 

</table> 

回答

相關問題