This documentation is archived and is not being maintained.

DataSourceSelectArguments.RetrieveTotalRowCount Property

Gets or sets a value indicating whether a data source control should retrieve a count of all the data rows during a data retrieval operation.

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

public bool RetrieveTotalRowCount { get; set; }
/** @property */
public boolean get_RetrieveTotalRowCount ()

/** @property */
public void set_RetrieveTotalRowCount (boolean value)

public function get RetrieveTotalRowCount () : boolean

public function set RetrieveTotalRowCount (value : boolean)

Not applicable.

Property Value

true if the data source control should retrieve a total data row count; otherwise, false.

The RetrieveTotalRowCount property supports paging scenarios. Set this property to true to request a total row count from the data source control during the data-retrieval operation. Check the DataSourceView.CanRetrieveTotalRowCount property to determine whether a data source view supports retrieving a total row count. If the data source supports it, the TotalRowCount property is set by the data source control during the course of a data retrieval operation and the total data row count is returned in the TotalRowCount property, much as a value is returned in an output parameter of a 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: