This documentation is archived and is not being maintained.

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 int MaximumRows { get; set; }
/** @property */
public int get_MaximumRows ()

/** @property */
public void set_MaximumRows (int value)

public function get MaximumRows () : int

public function set MaximumRows (value : int)

Not applicable.

Property Value

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 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 method.

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 method is called.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Show: