Export (0) Print
Expand All

PagedDataSource Class

Encapsulates the paging-related properties of a data-bound control (such as DataGrid, GridView, DetailsView, and FormView) that allow it to perform paging. This class cannot be inherited.

System.Object
  System.Web.UI.WebControls.PagedDataSource

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

public sealed class PagedDataSource : ICollection, 
	IEnumerable, ITypedList

The PagedDataSource type exposes the following members.

  NameDescription
Public methodPagedDataSourceInitializes a new instance of the PagedDataSource class.
Top

  NameDescription
Public propertyAllowCustomPagingGets or sets a value indicating whether custom paging is enabled in a data-bound control.
Public propertyAllowPagingGets or sets a value indicating whether paging is enabled in a data-bound control.
Public propertyAllowServerPagingGets or sets a value indicating whether server-side paging is enabled.
Public propertyCountGets the number of items to be used from the data source.
Public propertyCurrentPageIndexGets or sets the index of the current page.
Public propertyDataSourceGets or sets the data source.
Public propertyDataSourceCountGets the number of items in the data source.
Public propertyFirstIndexInPageGets the index of the first record displayed on the page.
Public propertyIsCustomPagingEnabledGets a value indicating whether custom paging is enabled.
Public propertyIsFirstPageGets a value indicating whether the current page is the first page.
Public propertyIsLastPageGets a value indicating whether the current page is the last page.
Public propertyIsPagingEnabledGets a value indicating whether paging is enabled.
Public propertyIsReadOnlyGets a value indicating whether the data source is read-only.
Public propertyIsServerPagingEnabledGets a value indicating whether server-side paging support is enabled.
Public propertyIsSynchronizedGets a value indicating whether access to the data source is synchronized (thread-safe).
Public propertyPageCountGets the total number of pages necessary to display all items in the data source.
Public propertyPageSizeGets or sets the number of items to display on a single page.
Public propertySyncRootGets the object that can be used to synchronize access to the collection.
Public propertyVirtualCountGets or sets the virtual number of items in the data source when custom paging is used.
Top

  NameDescription
Public methodCopyToCopies all the items from the data source to the specified System.Array, starting at the specified index in the System.Array.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetEnumeratorReturns a System.Collections.IEnumerator implemented object that contains all items in the data source.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetItemPropertiesReturns the System.ComponentModel.PropertyDescriptorCollection that represents the properties on each item used to bind data.
Public methodGetListNameReturns the name of the list. This method does not apply to this class.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public Extension MethodAsParallel()Overloaded. Enables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsParallel()Overloaded. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryable()Overloaded. Converts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodAsQueryable()Overloaded. (Defined by Queryable.)
Public Extension MethodCast<TResult>()Overloaded. Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodCast<TResult>()Overloaded. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>()Overloaded. Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>()Overloaded. (Defined by Enumerable.)
Top

The PagedDataSource class encapsulates the properties that allow data-source controls, such as the DataGrid, GridView, DetailsView, and FormView, to perform paging. This class is used by control developers when providing paging support to a custom data-bound control.

This class uses the best available method to enumerate over the data belonging to the current page. If the underlying data source supports indexed access (such as System.Array and System.Collections.IList), this class uses it. Otherwise, it uses the enumerator created by the GetEnumerator method.

For a list of initial property values for an instance of PagedDataSource, see the PagedDataSource constructor.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft