Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SqlDataSourceFilteringEventArgs Class

 

Provides data for the Filtering event of the SqlDataSource control.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

System::Object
  System::EventArgs
    System.ComponentModel::CancelEventArgs
      System.Web.UI.WebControls::SqlDataSourceFilteringEventArgs

public ref class SqlDataSourceFilteringEventArgs : CancelEventArgs

NameDescription
System_CAPS_pubmethodSqlDataSourceFilteringEventArgs(IOrderedDictionary^)

Initializes a new instance of the SqlDataSourceFilteringEventArgs class by using the specified object.

NameDescription
System_CAPS_pubpropertyCancel

Gets or sets a value indicating whether the event should be canceled.(Inherited from CancelEventArgs.)

System_CAPS_pubpropertyParameterValues

Gets an IOrderedDictionary object that provides access to the Parameter objects of the SqlDataSource class.

NameDescription
System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2017 Microsoft