DetailsView.GridLines プロパティ
アセンブリ: System.Web (system.web.dll 内)

Dim instance As DetailsView Dim value As GridLines value = instance.GridLines instance.GridLines = value
/** @property */ public GridLines get_GridLines () /** @property */ public void set_GridLines (GridLines value)
GridLines 値の 1 つ。既定値は GridLines.Both です。


GridLines プロパティを使用して、DetailsView コントロールのすべてのグリッド線を非表示にする方法のコード例を次に示します。
<%@ Page language="VB" %> <html> <body> <form id="Form1" runat="server"> <h3>DetailsView GridLines Example</h3> <asp:detailsview id="CustomerDetailView" datasourceid="DetailsViewSource" autogeneraterows="true" allowpaging="true" gridlines="None" runat="server"> <headerstyle backcolor="Navy" forecolor="White"/> </asp:detailsview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Northwind sample database. Use an ASP.NET --> <!-- expression to retrieve the connection string value --> <!-- from the web.config file. --> <asp:SqlDataSource ID="DetailsViewSource" runat="server" ConnectionString= "<%$ ConnectionStrings:NorthWindConnectionString%>" InsertCommand="INSERT INTO [Customers]([CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country]) VALUES (@CustomerID, @CompanyName, @Address, @City, @PostalCode, @Country)" SelectCommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]"> </asp:SqlDataSource> </form> </body> </html>
<%@ Page language="C#" %> <html> <body> <form id="Form1" runat="server"> <h3>DetailsView GridLines Example</h3> <asp:detailsview id="CustomerDetailView" datasourceid="DetailsViewSource" autogeneraterows="true" allowpaging="true" gridlines="None" runat="server"> <headerstyle backcolor="Navy" forecolor="White"/> </asp:detailsview> <!-- This example uses Microsoft SQL Server and connects --> <!-- to the Northwind sample database. Use an ASP.NET --> <!-- expression to retrieve the connection string value --> <!-- from the web.config file. --> <asp:SqlDataSource ID="DetailsViewSource" runat="server" ConnectionString= "<%$ ConnectionStrings:NorthWindConnectionString%>" InsertCommand="INSERT INTO [Customers]([CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country]) VALUES (@CustomerID, @CompanyName, @Address, @City, @PostalCode, @Country)" SelectCommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]"> </asp:SqlDataSource> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- DetailsView.GridLines プロパティのページへのリンク