0

I'm trying to remove the borders from a datagrid on an ASP.NET control. The control is a custom field template for a dynamic data website (if that matters) and is nested inside another datagrid. The problem is that whatever I do, it still has the same border styling as the outer data grid. I've tried setting in in the ASCX, in the code-behind, etc... all to no avail. Here's the relevant part of the ASCX:

<asp:DataGrid AllowSorting="true" AutoGenerateColumns="false" Enabled="true" ID="dataGrid" runat="server"
    OnItemDataBound="gridView_onRowDataBound" HeaderStyle-Font-Bold="true" ItemStyle-Font-Names="courier new"
    GridLines="None" CellPadding="0" CellSpacing="0" BorderWidth="0px" BorderStyle="None" ItemStyle-Font-Size="10" 
    ItemStyle-BorderWidth="0px" ItemStyle-BorderStyle="None" PageSize="200" AllowPaging="false" ItemStyle-Wrap="false"
    AlternatingItemStyle-BorderWidth="0px" AlternatingItemStyle-BorderStyle="None">

As you can see, I've tried everything to get rid of the lines and they still stick around. Here's a picture of what it looks like:

alt text http://nv3frg.blu.livefilestore.com/y1pUcaAqPzV0bOkyfxSM082D50DUhxXxAeUX4TvAkcak0oCGSLDa7W4kyp2BztcX61kFsyhM1pG3N7CeOE5Fd_o-z0hmi-NGGRq/untitled.bmp

BTW, I just want to get rid of the grid lines on the inner grid, the outer grid I don't really care.

animuson
  • 53,861
  • 28
  • 137
  • 147
Robert Fraser
  • 10,649
  • 8
  • 69
  • 93
  • 1
    Have you tried CSS styling? Or use browser developer tools like firebug to find out the source of the border styling, could be from somewhere else. – o.k.w Oct 05 '09 at 03:19

1 Answers1

2

I suggest you try setting the row style border color and border style properties as follow:

<RowStyle BorderColor="White" BorderStyle="None" />

Just FYI, on my page, setting the property GridLines="None" works. I noticed you already have that property set to "None", what version are you using?

Ricardo Sanchez
  • 6,079
  • 3
  • 24
  • 31
  • The newest; 3.5 SP1 or whatever. Is there a chance that it's not respecting the property because it's nested inside another grid? – Robert Fraser Oct 05 '09 at 09:23
  • One thing I noticed is that you are using a DataGrid control instead of the GridView control, in my example, the GridLines property works but I am using the GridView control not the Datagrid. – Ricardo Sanchez Oct 05 '09 at 16:18