asp.net.ph

DetailsView.PagerStyle Property

System.Web.UI.WebControls Namespace   DetailsView Class


.NET Framework version 2.0

Sets or retrieves the style properties of the pager element in a DetailsView control.

Syntax


Script DetailsView.PagerStyle.Property [ = enumValue ]

Property Value

A TableItemStyle object that defines the style properties for the pager element in a DetailsView.

Remarks

Use the PagerStyle property to control the appearance of the pager row in a DetailsView control. Common style attributes that can be set include forecolor, backcolor, font, and content alignment for the navigation controls. Providing different row styles enhances the appearance of the DetailsView 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 PagerStyle subproperties can be set declaratively using either of the following methods:

  • Include an attribute in the opening tag of the DetailsView control in the form PagerStyle-Property
    <asp:detailsview ... 
       pagerstyle-property=value
       ... >
    
    </asp:detailsview>
  • Include a <PagerStyle> element between the opening and closing tags of the DetailsView control
    <asp:detailsview ... >
    
       <pagerstyle
          ... property definitions here />
    
    </asp:detailsview>

The subproperties can also be set programmatically in the form PagerStyle.Property.

For a list of style properties that can be set, see the TableItemStyle class.

Example

The following example shows how to set the PagerStyle property of a DetailsView control at design time.

<asp:detailsview id = "empsView" runat = "server"
   ... >

   <pagerstyle
      backcolor = "steelblue" forecolor = "beige"
      horizontalalign = "right" />

   <itemtemplate>
      ...
   </itemtemplate>

</asp:detailsview>
DetailsView with Default Paging
Run Sample | View Source
See Also

DetailsView Members   PagerSettings 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