GridLines GridLines GridLines GridLines Enum

Definizione

Specifica gli stili delle linee di griglia dei controlli in base ai quali gli elementi vengono visualizzati in una struttura tabellare.Specifies the gridline styles for controls that display items in a table structure.

public enum class GridLines
public enum GridLines
type GridLines = 
Public Enum GridLines
Ereditarietà

Campi

Both Both Both Both 3

Viene eseguito il rendering sia delle linee di griglia orizzontali che verticali.Both horizontal and vertical gridlines are rendered.

Horizontal Horizontal Horizontal Horizontal 1

Viene eseguito il rendering solo delle linee di griglia orizzontali.Only horizontal gridlines are rendered.

None None None None 0

Non viene eseguito il rendering di nessuna linea di griglia.No gridlines are rendered.

Vertical Vertical Vertical Vertical 2

Viene eseguito il rendering solo delle linee di griglia verticali.Only vertical gridlines are rendered.

Esempi

Nell'esempio di codice riportato di seguito viene illustrato GridLines come utilizzare l'enumerazione per indicare che le linee GridView della griglia in un controllo devono essere nascoste.The following code example demonstrates how to use the GridLines enumeration to indicate that the gridlines in a GridView control should be hidden.


<%@ 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>

Commenti

L' GridLines enumerazione rappresenta i diversi stili della griglia per i controlli che visualizzano gli elementi in una struttura di tabella.The GridLines enumeration represents the different gridline styles for controls that display items in a table structure. È possibile visualizzare le linee orizzontali, verticali, sia orizzontali che verticali oppure nessuna griglia.You can display the horizontal, the vertical, both the horizontal and vertical, or no grid lines.

Si applica a

Vedi anche