DynamicDataExtensions.EnablePersistedSelection(BaseDataBoundControl) 方法

定義

警告

Use the EnablePersistedSelection property on a databound control such as GridView or ListView.

啟用要保存於資料控制項中且支援選取和分頁的選項。

public:
[System::Runtime::CompilerServices::Extension]
 static void EnablePersistedSelection(System::Web::UI::WebControls::BaseDataBoundControl ^ dataBoundControl);
public static void EnablePersistedSelection (this System.Web.UI.WebControls.BaseDataBoundControl dataBoundControl);
[System.Obsolete("Use the EnablePersistedSelection property on a databound control such as GridView or ListView.")]
public static void EnablePersistedSelection (this System.Web.UI.WebControls.BaseDataBoundControl dataBoundControl);
static member EnablePersistedSelection : System.Web.UI.WebControls.BaseDataBoundControl -> unit
[<System.Obsolete("Use the EnablePersistedSelection property on a databound control such as GridView or ListView.")>]
static member EnablePersistedSelection : System.Web.UI.WebControls.BaseDataBoundControl -> unit
<Extension()>
Public Sub EnablePersistedSelection (dataBoundControl As BaseDataBoundControl)

參數

dataBoundControl
BaseDataBoundControl

資料繫結控制項。

屬性

備註

在擴充 BaseDataBoundControl 及支援選取範圍、分頁和排序的控制項中,呼叫這個方法可讓控制項保存選取範圍,即使選取的資料列不可見也一樣。 例如,如果使用者選取資料列,然後分頁到另一頁,或使用者排序資料,則選取的資料列會維持選取狀態。 如果未呼叫這個方法,當使用者頁面或排序時,選取專案就會遺失。

RegisterControl 方法呼叫 EnablePersistedSelection

適用於