Επεξεργασία

Κοινή χρήση μέσω


DynamicDataExtensions.EnablePersistedSelection(BaseDataBoundControl) Method

Definition

Caution

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

Enables selection to be persisted in data controls that support selection and paging.

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)

Parameters

dataBoundControl
BaseDataBoundControl

The data bound control.

Attributes

Remarks

In controls that extend BaseDataBoundControl and that support selection, paging, and sorting, calling this method enables the control to persist selection even when the selected row is not visible. For example, if the user selects a row and then pages to another page, or if the user sorts the data, the selected row remains selected. If this method is not called, selection is lost when the user pages or sorts.

The RegisterControl method calls EnablePersistedSelection.

Applies to