asp.net.ph

FormView.PagerSettings Property

System.Web.UI.WebControls Namespace   FormView Class


.NET Framework version 2.0

Defines or retrieves the settings for the pager element in a FormView control.

Syntax


Script FormView.PagerSettings.Property [ = enumValue ]

Property Value

A PagerSettings object that defines the settings for the pager element in a FormView.

Remarks

Use the PagerSettings property to control the behavior of the pager row in a FormView control.

The pager row is displayed when the paging feature is enabled ( by setting the AllowPaging property to true ) and contains the controls that allow the user to navigate to the different pages in the control.

The PagerSettings subproperties can be set declaratively using either of the following methods:

  • Include an attribute in the opening tag of the FormView control in the form PagerSettings-Property
    <asp:formview ... 
       pagersettings-property=value
       ... >
    
    </asp:formview>
  • Include a <PagerSettings> element between the opening and closing tags of the FormView control
    <asp:formview ... >
    
       <pagersettings
          ... property definitions here />
    
    </asp:formview>

The subproperties can also be set programmatically in the form PagerSettings.Property. Common settings usually include the pager row's display mode and custom text or images for the navigation controls.

For a list of pager properties that can be set, see the PagerSettings class.

Example

The following example shows how to initally set the PagerSettings property of a FormView control at design time, which can be changed dynamically at run time.

<asp:formview id = "plansGrid" runat = "server"
   ... >

   <pagersettings
      mode = "nextprevious"
      nextpagetext = "Next" previouspagetext = "Back" 
      position = "top"
      pagebuttoncount=10 />

   <columns>
      ...
   </columns>

</asp:formview>
FormView with Default Paging
Run Sample | View Source
See Also

FormView Members   PagerStyle   Specifying Paging Behavior in a FormView Control Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph