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

適用於