GridLines 열거형

정의

테이블 구조로 항목을 표시하는 컨트롤에 대한 모눈선 스타일을 지정합니다.

public enum class GridLines
public enum GridLines
type GridLines = 
Public Enum GridLines
상속
GridLines

필드

Both 3

가로 및 세로 모눈선 모두 렌더링됩니다.

Horizontal 1

가로 모눈선만 렌더링됩니다.

None 0

모눈선이 렌더링되지 않습니다.

Vertical 2

세로 모눈선만 렌더링됩니다.

예제

다음 코드 예제를 사용 하는 방법에 설명 합니다 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 열거형 테이블 구조에서 항목을 표시 하는 컨트롤에 대 한 다양 한 모눈선 스타일을 나타냅니다. 가로, 세로, 가로 모두 표시할 수 있습니다 및 세로 축 또는 모눈선이 없습니다.

적용 대상

추가 정보