title: Removing [selected] borders in a DetailsView control
body: <p>I have a <a href="http://www.albaassoc.com/events/eventdetails.aspx?eventid=29" rel="nofollow noreferrer">DetailsView control</a> which includes several rows that form an address. Ideally I'd like to 'merge' the Address row with the following two rows - essentially removing the borders between them.</p>
  
  <p>I'm guessing that I could use a asp:TemplateField to create an approximate solution (use a single row, but us line breaks in the seconf (data) cell), but I'd rather see if there are any other means along the same lines of my previous styling (using CssClass). Besides, this is a learning exercise as much as anything else.</p>
  
  <p>I've tried giving the Address2 BoundField a class and removing the bottom and top borders via CSS, but it doesn't seem to work. Looking at the HTML, it is assigning the class to a single cell, whereas I think that I need to apply this class to to the whole row. I can't any means of address the full row; I can deal with all rows, either column or just one cell.</p>
  
  <p>Any suggestions?</p>
  
  <p>Code Snippets:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;h2 class="title"&gt;Event Details&lt;/h2&gt;
      &lt;div class="entry"&gt;
          &lt;form id="frmEvents" runat="server"&gt;
              &lt;asp:DetailsView ID="vwEventDetails" runat="server" CssClass="vwEventDetails" FieldHeaderStyle-CssClass="FieldCol" &gt;
                  &lt;Fields&gt;
                      &lt;asp:BoundField HeaderText="Event" DataField="EventName" ReadOnly="true" SortExpression="EventName" /&gt;
                      &lt;asp:BoundField HeaderText="Date &amp;amp; Time" DataField="EventDate" ReadOnly="true" SortExpression="EventDate" /&gt;
                      &lt;asp:BoundField HeaderText="Address" DataField="Address1" ReadOnly="true" SortExpression="Address1" /&gt;
                      &lt;asp:BoundField HeaderText="" DataField="Address2" ReadOnly="true" SortExpression="Address2" ItemStyle-CssClass="noBorders" /&gt;
                      &lt;asp:BoundField HeaderText="" DataField="Address3" ReadOnly="true" SortExpression="Address3" /&gt;
                      &lt;asp:BoundField HeaderText="Town" DataField="Town" ReadOnly="true" SortExpression="Town" /&gt;
                      &lt;asp:BoundField HeaderText="County" DataField="County" ReadOnly="true" SortExpression="County" /&gt;
                      &lt;asp:BoundField HeaderText="Postcode" DataField="Postcode" ReadOnly="true" SortExpression="Postcode" /&gt;
                      &lt;asp:BoundField HeaderText="Entry Fee" DataField="EventFee" ReadOnly="true" SortExpression="EntryFee" /&gt;
                      &lt;asp:BoundField HeaderText="Sponsor" DataField="SponsorName" ReadOnly="true" SortExpression="Sponsor" /&gt;
                      &lt;asp:BoundField HeaderText="Category" DataField="CategoryName" ReadOnly="true" SortExpression="Category" /&gt;
                      &lt;asp:HyperLinkField HeaderText="" DataTextField="" Text="Make A Booking" DataNavigateUrlFields="EventID" DataNavigateUrlFormatString="bookevent.aspx?eventid={0}" /&gt;
                  &lt;/Fields&gt;
              &lt;/asp:DetailsView&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.vwEventDetails .FieldCol
  {
      font-weight: bold;
      background-color: #99CCFF;
      width: 100px;
  }
  
  .vwEventDetails tr td
  {
      padding: 0 2em;
  }
  
  .noBorders
  {
      border-bottom-style:none;
      border-top-style:none;
  }
  </code></pre>