BindingSource.CurrentChanged 事件

定義

發生於目前繫結的項目變更時。Occurs when the currently bound item changes.

public:
 event EventHandler ^ CurrentChanged;
public event EventHandler CurrentChanged;
member this.CurrentChanged : EventHandler 
Public Custom Event CurrentChanged As EventHandler 

事件類型

EventHandler

備註

CurrentChanged每當 Current 屬性因為下列任何原因而變更時,就會引發事件:The CurrentChanged event is raised whenever the Current property changes for any of the following reasons:

  • 變更的目前位置 ListThe current position of the List changes.

  • DataSourceDataMember 屬性變更。The DataSource or DataMember properties change.

  • 基礎變更的成員資格 List ,這會導致 Position 參考不同的專案。The membership of the underlying List changes, which causes Position to refer to a different item. 範例包括在目前專案之前加入或刪除專案、刪除或移動目前的專案,或將專案移至目前的位置。Examples include adding or deleting an item before the current item, deleting or moving the current item itself, or moving an item to the current position.

  • 基礎清單會由新的排序或篩選作業重新整理。The underlying list is refreshed by a new sorting or filtering operation.

觸發這個事件時, Current 屬性就會包含新的值。When this event is triggered, the Current property will already contain its new value.

CurrentChanged 是類別的預設事件 BindingSourceCurrentChanged is the default event for the BindingSource class.

如需處理事件的詳細資訊,請參閱 處理和引發事件For more information about handling events, see Handling and Raising Events.

適用於

另請參閱