2012-12-04 51 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