GridView.IPersistedSelector.DataKey Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
For a description of this member, see DataKey.
property System::Web::UI::WebControls::DataKey ^ System::Web::UI::WebControls::IPersistedSelector::DataKey { System::Web::UI::WebControls::DataKey ^ get(); void set(System::Web::UI::WebControls::DataKey ^ value); };
System.Web.UI.WebControls.DataKey System.Web.UI.WebControls.IPersistedSelector.DataKey { get; set; }
member this.System.Web.UI.WebControls.IPersistedSelector.DataKey : System.Web.UI.WebControls.DataKey with get, set
Property DataKey As DataKey Implements IPersistedSelector.DataKey
Property Value
The data-key value for the persisted selected record in a data-bound control.
Implements
Remarks
You can specify how selected rows are persisted when the GridView control is in paging mode. By default, row selection is based on row index. The same row (for example, the third row) is selected on each page. Alternatively, you can enable persistence based on the data key of the selected row. In that case, if you select row 3 on page 1 and you move to page 2, no row is selected on page 2. If you move back to page 1, row 3 is still selected. To enable this functionality, set this property to true
.
Note
In versions 2.0, 3.0, and 3.5 of ASP.NET, row selection was based only on row index. By default, row selection in ASP.NET 4 is based on index for backward compatibility.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기