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.

C#
public static void EnablePersistedSelection(this System.Web.UI.WebControls.BaseDataBoundControl dataBoundControl);
C#
[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);

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

Product Versions (Obsolete)
.NET Framework 3.5 (4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)