Have you wondered how to set the color between two rows in an ASP.NET GridView. The GridView control does not provide a direct attribute for setting a color to the lines between two rows. But here’s how to do it using CSS:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Change Color of Lines</title>
<style type="text/css">
.gridLines td
{
border-bottom: 1px solid Gray;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false"
GridLines="Horizontal" CssClass="gridLines" DataKeyNames="ID" >
<Columns>
...
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
Tweet
No comments:
Post a Comment