SqlDataSourceFilteringEventArgs Class
Provides data for the Filtering event of the SqlDataSource control.
System::EventArgs
System.ComponentModel::CancelEventArgs
System.Web.UI.WebControls::SqlDataSourceFilteringEventArgs
Assembly: System.Web (in System.Web.dll)
The SqlDataSourceFilteringEventArgs type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | SqlDataSourceFilteringEventArgs | Initializes a new instance of the SqlDataSourceFilteringEventArgs class by using the specified object. |
| Name | Description | |
|---|---|---|
![]() | Cancel | Gets or sets a value indicating whether the event should be canceled. (Inherited from CancelEventArgs.) |
![]() | ParameterValues | Gets an IOrderedDictionary object that provides access to the Parameter objects of the SqlDataSource class. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The SqlDataSourceFilteringEventArgs class is used to pass data to the Filtering event handler of the SqlDataSource control. The ParameterValues property provides access to the filter parameter values before the filtering operation is performed. You can cancel the Select method by setting the Cancel property of the ObjectDataSourceFilteringEventArgs to true. Filtering is supported when the DataSourceMode property is set to the DataSet value.
The following code example demonstrates how to retrieve data from the Northwind database and filter it using a FilterExpression and FilterParameters. The FilterExpression of the SqlDataSource is applied anytime the Select method is executed to retrieve data. In this example, the FilterExpression contains a placeholder for a filter parameter, which is contained in the FilterParameters collection. In the Filtering event, the filter parameter is displayed in a Label control.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


