DynamicDataExtensions.EnablePersistedSelection(BaseDataBoundControl) Méthode

Définition

Attention

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

Permet de conserver la sélection dans les contrôles de données qui prennent en charge la sélection et la pagination.

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)

Paramètres

dataBoundControl
BaseDataBoundControl

Contrôle lié aux données.

Attributs

Remarques

Dans les contrôles qui étendent BaseDataBoundControl et prennent en charge la sélection, la pagination et le tri, l’appel de cette méthode permet au contrôle de conserver la sélection même lorsque la ligne sélectionnée n’est pas visible. Par exemple, si l’utilisateur sélectionne une ligne, puis des pages vers une autre page ou si l’utilisateur trie les données, la ligne sélectionnée reste sélectionnée. Si cette méthode n’est pas appelée, la sélection est perdue lorsque les pages utilisateur ou trient.

La RegisterControl méthode appelle EnablePersistedSelection.

S’applique à