DynamicFilter.FilterChanged Event

.NET Framework (current version)
 

Occurs when the user select a value for the foreign key.

Namespace:   System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

Public Event FilterChanged As EventHandler

The FilterChanged event is raised when the user selects a foreign-key value and before the new value is rendered. This enables you to provide an event-handling method that can perform custom operations, such as custom paging.

The following example shows how to handle a filter-changed event. The handler resets the page index before the filtered rows are displayed.

' Handle the filter change event.
Protected Sub OnFilterSelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
    ' Reset the index of the page to display after 
    ' the data filter value has been changed.
    GridView1.PageIndex = 0

End Sub

.NET Framework
Available since 4.0
Return to top
Show: