DataSourceView.CanRetrieveTotalRowCount 屬性

定義

取得值,指出與目前 DataSourceView 物件關聯的 DataSourceControl 物件是否支援擷取資料列總數,而非資料。

public:
 virtual property bool CanRetrieveTotalRowCount { bool get(); };
public virtual bool CanRetrieveTotalRowCount { get; }
member this.CanRetrieveTotalRowCount : bool
Public Overridable ReadOnly Property CanRetrieveTotalRowCount As Boolean

屬性值

如果支援該作業則為 true,否則為 false。 基底類別實作會傳回 false

備註

資料繫結控制項可以藉由將 DataSourceCapabilities.RetrieveTotalRowCount 欄位 System.Web.UI.DataSourceSelectArguments 加入至傳遞至 ExecuteSelect 方法的物件,以要求總數據列計數。 如果資料繫結控制項要求總計資料列計數,但 CanRetrieveTotalRowCount 屬性會傳回 ,則資料來源檢視會擲回 false 例外狀況。

適用於

另請參閱