SqlDataSource.Filtering 事件

定义

执行筛选操作前发生。Occurs before a filter operation.

public:
 event System::Web::UI::WebControls::SqlDataSourceFilteringEventHandler ^ Filtering;
public event System.Web.UI.WebControls.SqlDataSourceFilteringEventHandler Filtering;
member this.Filtering : System.Web.UI.WebControls.SqlDataSourceFilteringEventHandler 
Public Custom Event Filtering As SqlDataSourceFilteringEventHandler 

事件类型

SqlDataSourceFilteringEventHandler

注解

处理 Filtering 事件,在 SqlDataSource 控件执行筛选器操作之前对筛选器参数值执行验证操作。Handle the Filtering event to perform validation operations on filter parameter values before the SqlDataSource control performs a filter operation. 可以 Select 通过将 Cancel 对象的属性设置为来取消方法 SqlDataSourceFilteringEventArgs trueYou can cancel the Select method by setting the Cancel property of the SqlDataSourceFilteringEventArgs object to true. 仅当设置了属性时才引发事件 FilterExpressionThe event is raised only if the FilterExpression property is set.

SqlDataSource.Filtering事件委托给 SqlDataSourceView.Filtering SqlDataSourceView 与控件相关联的对象的事件 SqlDataSourceThe SqlDataSource.Filtering event delegates to the SqlDataSourceView.Filtering event of the SqlDataSourceView object that is associated with the SqlDataSource control.

有关如何处理事件的详细信息,请参阅 处理和引发事件For more information about how to handle events, see Handling and Raising Events.

适用于