GridLines 列挙体
アセンブリ: System.Web (system.web.dll 内)

Public Enumeration GridLines

メンバ名 | 説明 | |
---|---|---|
Both | 水平グリッド線と垂直グリッド線の両方が表示されます。 | |
Horizontal | 水平グリッド線だけが表示されます。 | |
None | グリッド線は表示されません。 | |
Vertical | 垂直グリッド線だけが表示されます。 |

GridLines 列挙体は、テーブル構造で項目を表示するコントロールのさまざまなグリッド線のスタイルを表します。水平グリッド線を表示、垂直グリッド線を表示、水平グリッド線と垂直グリッド線を表示、またはグリッド線を非表示にできます。

GridLines 列挙体を使用して、GridView コントロールのグリッド線を非表示にするコード例を次に示します。
<%@ Page language="VB" %> <html> <body> <form runat="server"> <h3>GridView GridLines Example</h3> <asp:gridview id="CustomersGridView" datasourceid="CustomersSqlDataSource" autogeneratecolumns="true" gridlines="None" runat="server"> </asp:gridview> <!-- 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="CustomersSqlDataSource" selectcommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]" connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>" runat="server"> </asp:sqldatasource> </form> </body> </html>
<%@ Page language="C#" %> <html> <body> <form runat="server"> <h3>GridView GridLines Example</h3> <asp:gridview id="CustomersGridView" datasourceid="CustomersSqlDataSource" autogeneratecolumns="true" gridlines="None" runat="server"> </asp:gridview> <!-- 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="CustomersSqlDataSource" selectcommand="Select [CustomerID], [CompanyName], [Address], [City], [PostalCode], [Country] From [Customers]" connectionstring="<%$ ConnectionStrings:NorthWindConnectionString%>" runat="server"> </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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


グリッドライン
- GridLinesのページへのリンク