Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing rules attribute from asp.net gridview

i have a gridview i wish to style without borders but whenever i use the control asp.net adds in the attribute rules="all" i've tried overriding in on the control like so:

<asp:GridView ID="GridView1" runat="server" rules="none">

but this doesn't work either

like image 483
Stephen Binns Avatar asked Sep 24 '09 14:09

Stephen Binns


2 Answers

Specify GridLines="None" in the asp:GridView tag or in your code-behind:

myGridView.GridLines = GridLines.None

Additionally, if you have time, it's worth looking into the ASP.NET 2.0 CSS Friendly Control Adapters 1.0, which produce much cleaner markup than the default controls output.

like image 114
Jeff Sternal Avatar answered Sep 28 '22 02:09

Jeff Sternal


try the gridlines property, set it to none.

like image 31
Colin Avatar answered Sep 28 '22 01:09

Colin