Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

DetailsView.TopPagerRow Property

Gets a DetailsViewRow object that represents the top pager row in a DetailsView control.

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

[<BrowsableAttribute(false)>]
abstract TopPagerRow : DetailsViewRow with get
[<BrowsableAttribute(false)>]
override TopPagerRow : DetailsViewRow with get

Property Value

Type: System.Web.UI.WebControls.DetailsViewRow
A DetailsViewRow that represents the top pager row in the DetailsView control.

When paging is enabled (by setting the AllowPaging property to true), an additional row called the pager row is automatically displayed in the DetailsView control. The pager row contains controls that allow the user to navigate to other records, and can be displayed at the top, the bottom, or both the top and bottom of the control. Use the TopPagerRow property to programmatically access the DetailsViewRow object that represents the top pager row in the DetailsView control.

NoteNote

The TopPagerRow property is available only after the DetailsView control creates the bottom pager row in the ItemCreated event.

This property is commonly used when you need to programmatically manipulate the top pager row, for example when adding custom content. Any modification to the TopPagerRow property must be performed after the DetailsView control has been rendered; otherwise, the DetailsView control will overwrite any changes.

The following code example demonstrates how to use the TopPagerRow property to access the top pager row of the DetailsView control during the ItemCreated event. Two Label controls within the custom pager row are then updated with the current page number and total number of pages.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft