ObjectDataSourceView::EnablePaging Property
Gets or sets a value indicating whether the data source control supports paging through the set of data that it retrieves.
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System::Booleantrue, if the data source control supports paging through the data it retrieves; otherwise, false.
Paging by the ObjectDataSourceView control is handled by setting the EnablePaging, StartRowIndexParameterName, MaximumRowsParameterName, and SelectCountMethod properties of the ObjectDataSourceView and defining a Select method in the business object with the proper parameters. When the EnablePaging property is set to true, the SelectParameters collection includes two additional parameters for the first row requested and the number of rows requested. These two parameters are named as defined by the StartRowIndexParameterName and MaximumRowsParameterName properties. The Select method should return the requested number of rows starting at the specified index. Because the data might not divide evenly by the page size, the last page might contain fewer rows. Thus, the number of rows requested is actually the maximum number of rows that are returned.
The CanRetrieveTotalRowCount property is checked during a call to the ExecuteSelect method to ensure that the data source control supports all capabilities requested by setting the various DataSourceSelectArguments properties.
When paging is enabled on the associated data-bound control, the data-bound control calls the Select method with the start index and number of rows that are required. Additionally, if the SelectCountMethod property is set, the data-bound control calls the method before rendering the pager controls. For example, if a GridView control has paging enabled with a page size of 5, and the SelectCountMethod method returns 20, only 4 pages are displayed in the pager.
The value of the EnablePaging property is stored in view state.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.