'Declaration Public Event Filtering As EventHandler(Of CancellableFilteringEventArgs)
public event EventHandler<CancellableFilteringEventArgs> Filtering
The event handler receives an argument of type CancellableFilteringEventArgs containing data related to this event. The following CancellableFilteringEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Cancel (Inherited from Infragistics.CancellableEventArgs) | |
Column (Inherited from Infragistics.Controls.Grids.CancellableColumnEventArgs) | The CancellableColumnEventArgs.Column that this event was triggered for. |
FilteringOperand | The FilterOperand which is being used to filter. |
FilterValue | The value which will be used by the filter. |
RowFiltersCollection | The RowFiltersCollection which is going to be modified. |
AddHandler Me.MyDataGrid.Filtering, AddressOf MyDataGrid_Filtering Private Sub MyDataGrid_Filtering(ByVal sender As System.Object, ByVal e As CancellableFilteringEventArgs) 'Do not allow the ProductName column to be filtered If (e.Column.Key.Equals("ProductName")) Then System.Diagnostics.Debug.WriteLine("You cannot filter on the ProductName column") e.Cancel = True Return End If System.Diagnostics.Debug.WriteLine("Grid Filtered on value " + e.FilterValue.ToString()) End Sub
this.MyDataGrid.Filtering += new EventHandler<CancellableFilteringEventArgs>(MyDataGrid_Filtering); void MyDataGrid_Filtering(object sender, CancellableFilteringEventArgs e) { //Do not allow the ProductName column to be filtered if (e.Column.Key.Equals("ProductName")) { System.Diagnostics.Debug.WriteLine("You cannot filter on the ProductName column"); e.Cancel = true; return; } System.Diagnostics.Debug.WriteLine("Grid filtered on value " + e.FilterValue.ToString()); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2