GridView.OnSorted(EventArgs) 方法

定义

引发 Sorted 事件。

protected:
 virtual void OnSorted(EventArgs ^ e);
protected virtual void OnSorted(EventArgs e);
abstract member OnSorted : EventArgs -> unit
override this.OnSorted : EventArgs -> unit
Protected Overridable Sub OnSorted (e As EventArgs)

参数

e
EventArgs

包含事件数据的一个 EventArgs

注解

Sorted单击超链接对列进行排序时,将引发该事件,但在控件处理排序操作之后GridView。 这样,便可以提供一种事件处理方法,该方法可在发生此事件时执行自定义例程(如自定义排序)。

引发事件会通过委托调用事件处理程序。 有关详细信息,请参阅 处理和引发事件

该方法 OnSorted 还允许派生类在不附加委托的情况下处理事件。 这是处理派生类中的事件的首选技术。

继承者说明

在派生类中重写 OnSorted(EventArgs) 时,请务必调用基类的方法,以便已注册的 OnSorted(EventArgs) 委托接收事件。

适用于

另请参阅