DetailsView::TopPagerRow Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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)

property DetailsViewRow^ TopPagerRow {
	virtual DetailsViewRow^ 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.


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
Available since 2.0
Return to top