Exportar (0) Imprimir
Expandir Tudo
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
Tradução
Original

FormView.PagerStyle Propriedade

Gets a reference to the TableItemStyle object that allows you to set the appearance of the pager row in a FormView control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (em System.Web. dll)

[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public TableItemStyle PagerStyle { get; }

Valor da propriedade

Tipo: System.Web.UI.WebControls.TableItemStyle

A reference to the TableItemStyle that represents the style of the pager row in a FormView control.

Use the PagerStyle property to control the appearance of the pager row in a FormView control.The pager row is displayed when the paging feature is enabled (when the AllowPaging property is set to true), and contains the controls that allow the user to navigate to the different pages in the control.This property is read-only; however, you can set the properties of the TableItemStyle object it returns.As propriedades podem ser definidas declarativamente usando um dos métodos a seguir:

  • Place an attribute in the opening tag of the FormView control in the form Property-Subproperty, where Subproperty is a property of the TableItemStyle object (for example, PagerStyle-ForeColor).

  • Nest a <PagerRowStyle> element between the opening and closing tags of the FormView control.

The properties can also be set programmatically in the form Property.Subproperty (for example, PagerStyle.ForeColor).Configurações comuns geralmente incluem um Personalizar Cor do plano de fundo, primeiro plano cor e fonte propriedades.

The following example demonstrates how to use the PagerStyle property to specify the style settings for the pager row.


<%@ Page language= %>

<!DOCTYPE html PUBLIC "-
    "http:
<html xmlns="http:
  <head runat=>
    <title>FormView AllowPaging Example</title>
</head>
<body>
    <form id= runat=>

      <h3>FormView AllowPaging Example</h3>

      <asp:formview id=
        datasourceid=
        allowpaging=
        datakeynames= 
        runat=>

        <pagersettings mode=
          position=/>

        <pagerstyle backcolor=
          horizontalalign=/>

        <itemtemplate>

          <table>
            <tr>
              <td>
                <asp:image id=
                  imageurl='<%# Eval() %>'
                  alternatetext='<%# Eval() %>' 
                  runat=/>
              </td>
              <td>
                <h3><%# Eval() %>&nbsp;<%# Eval() %></h3>      
                <%# Eval() %>        
              </td>
            </tr>
          </table>

        </itemtemplate> 

      </asp:formview>

      <!-- This example uses Microsoft SQL Server and connects  -->
      <!-- to the Northwind sample database. Use an ASP.NET     -->
      <!-- expression to retrieve the connection string value   -->
      <!--  the Web.config file.                            -->
      <asp:sqldatasource id=
        selectcommand=
        connectionstring= 
        runat=/>

    </form>
  </body>
</html>



Contribuições da comunidade

ADICIONAR
Mostrar:
© 2014 Microsoft