DynamicDataExtensions.EnablePersistedSelection(BaseDataBoundControl) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
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。