GridLines 열거형
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
테이블 구조의 항목을 표시하는 컨트롤의 눈금선 스타일을 지정합니다.
public enum class GridLines
public enum GridLines
type GridLines =
Public Enum GridLines
- 상속
필드
| Name | 값 | Description |
|---|---|---|
| None | 0 | 눈금선은 렌더링되지 않습니다. |
| Horizontal | 1 | 가로 눈금선만 렌더링됩니다. |
| Vertical | 2 | 세로 눈금선만 렌더링됩니다. |
| Both | 3 | 가로 및 세로 눈금선이 모두 렌더링됩니다. |
예제
다음 코드 예제에서는 열거형을 사용하여 GridLines 컨트롤의 눈금선을 숨겨야 함을 나타내는 방법을 보여 줍니다 GridView .
<%@ Page language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>GridView GridLines Example</title>
</head>
<body>
<form id="form1" 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="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>GridView GridLines Example</title>
</head>
<body>
<form id="form1" 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>
설명
열거형은 GridLines 테이블 구조의 항목을 표시하는 컨트롤에 대한 다양한 눈금선 스타일을 나타냅니다. 가로, 세로, 가로 및 세로를 모두 표시하거나 눈금선을 표시하지 않을 수 있습니다.