ObjectDataSourceView.EnablePaging Property
Assembly: System.Web (in system.web.dll)
/** @property */ public boolean get_EnablePaging () /** @property */ public void set_EnablePaging (boolean value)
public function get EnablePaging () : boolean public function set EnablePaging (value : boolean)
Property Value
true, 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 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.