daniel aagentah
daniel aagentah

Reputation: 1702

ASP Gridview - Remove All Borders Except Inner Row Lines

I am trying to remove all the borders except the inner horizontal row lines for my asp grid view, This is my ASP so far:

<asp:GridView ShowHeader="true" ID="MeetingSumaryGridview1" DataKeyNames="IdInsert, Summary"
                                        runat="server" AutoGenerateColumns="false" GridLines="Horizontal" BorderStyle="solid" BorderWidth="1px" DataSourceID="MeetingSumaryDataSource1"
                                        Style="font-size: 0.8em;" Width="100%">
                                        <Columns>...

I have looked around the web but have had no luck with this issue, any help or advice with this would be appreciated.

Thank you in advance.

Upvotes: 1

Views: 2587

Answers (1)

terbubbs
terbubbs

Reputation: 1512

Is this what you are looking for?

Here is some CSS edited from this answer:

table {
    border-collapse: collapse;
}
table td, table th {
    border: 1px solid black;
}
table tr:first-child th {
    border-top: 0;
}
table tr:last-child td {
    border-bottom: 0;
}
table tr td,
table tr th {
    border-left: 0;
}
table tr td,
table tr th  {
    border-right: 0;
}

Just assign it to the GridView's CssStyle

Upvotes: 1

Related Questions