Export (0) Print
Expand All

DataSourceSelectArguments::MaximumRows Property

Gets or sets a value that represents the maximum number of data rows that a data source control returns for a data retrieval operation.

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

public:
property int MaximumRows {
	int get ();
	void set (int value);
}

Property Value

Type: System::Int32
The maximum number of data rows that a data source returns for a data retrieval operation. The default value is 0, which indicates that all possible data rows are returned.

The MaximumRows property supports paging scenarios. Data-bound controls check a data source view's CanPage property at run time, and add a DataSourceCapabilities::Page capability using the AddSupportedCapabilities(DataSourceCapabilities) method if the view supports paging. If the data-bound control fails to add the capability, and the paging properties are set on a DataSourceSelectArguments object passed to the data source view during a data retrieval operation, an InvalidOperationException exception might be thrown.

The data-bound control can request a subset of data from a data source control for paging by setting the StartRowIndex and MaximumRows properties on the DataSourceSelectArguments object passed to the Select(DataSourceSelectArguments, DataSourceViewSelectCallback) method.

Important noteImportant

If any of the DataSourceSelectArguments properties are set, but the currently bound data source control does not support the requested capability, an InvalidOperationException exception is thrown when the DataSourceSelectArguments::RaiseUnsupportedCapabilitiesError(DataSourceView) method is called.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.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.

Show:
© 2014 Microsoft