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.PagerSettings Propriedade

Gets a reference to the PagerSettings object that allows you to set the properties of the pager buttons in a FormView control.

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

[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public virtual PagerSettings PagerSettings { get; }

Valor da propriedade

Tipo: System.Web.UI.WebControls.PagerSettings

A reference to the PagerSettings that allows you to set the properties of the pager buttons in a FormView control.

Use the PagerSettings property to control the settings 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 records in the control.This property is read-only; however, you can set the properties of the PagerSettings object it returns.The properties can be set declaratively in the form Property-Subproperty, where Subproperty is a property of the PagerSettings object (for example, PagerSettings-Mode).The properties can also be set programmatically in the form Property.Subproperty (for example, PagerSettings.Mode).Configurações comuns geralmente incluem da linha de pager Exibir modo e Personalizar texto ou imagens para controles de navegação.

The following example demonstrates how to use the PagerSettings property to specify the properties of 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