2012-12-04 53 views
1

我在GridView單元格內有一個gridview,就像你在圖像上看到的那樣。我正在嘗試刪除兩條水平線,我認爲這些線位於單詞旁邊的邊界之下,並且超出了下一個單詞的範圍。Gridview:不能刪除邊框

enter image description here

foreach (TableCell tc in e.Row.Cells) 
     { 
      tc.Attributes["style"] = "border-bottom-style:none"; 
      tc.Attributes["style"] = "border-width:0px"; 
      tc.Attributes["style"] = "border-top-style:none"; 
     } 

但它不工作。任何幫助?

+2

請發佈代碼 –

回答

12

以下屬性添加到你的GridView

GridLines="None" 

這應該刪除所有邊框。

+0

謝謝,非常有用。 – MonkeyDoug