# AutoFilteringColumn

Learn the syntax and arguments for the AutoFilteringColumn event available in Spread for ASP.NET.

## Content

Occurs when the user filters the column.

## Syntax

[Inline HTML]

```html
<ELEMENT AutoFilteringColumn = "handler" ...>
```

[JavaScript]

```javascript
FpSpread1.addEventListener("AutoFilteringColumn", handler, ...)
```

or

```javascript
FpSpread1.onAutoFilteringColumn = handler
```

## Arguments

***event.col***
Column index to filter
***event.filterString***
String to be filtered by
***event.cancel***
Whether to cancel the operation
***event.spread***
Spread that raises the event

## Return Type

None

## Remarks

This event is triggered when the user selects an item in the drop-down filter list.
The client-side AutoFilteringColumn event is fired before the client sends the filtering request to the server . If the filtering request is not canceled, the client will send the filtering request to the server.
If the columns are filtered with code, for example (FpSpread1.ActiveSheetView.AutoFilterColumn(1,"apple")), then the client-side AutoFilteringColumn event will not be fired.

## Example

This example JavaScript code maps the event for the Spread on the client side.

```javascript
<script lang="javascript" type="text/javascript">
    window.onload = function () {
      var spread1 = document.getElementById("<%=FpSpread1.ClientID %>");
       if (document.all) {
// IE
if (spread1.addEventListener) {
// IE9
spread1.addEventListener("AutoFilteringColumn", autofilter, false);
} else {
// Other versions of IE and IE9 quirks mode (no doctype set)
spread1.onAutoFilteringColumn = autofilter;
}
}
else {
// Firefox
        spread1.addEventListener("AutoFilteringColumn", autofilter, false);
      }
      }
    
    function autofilter(event) {
      alert("filter");
    }
</script>
```

## See Also

[AutoFilteredColumn](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allevents/CSSR-onAutoFColComplete)
[SetActiveCell](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allmeths/CSSR-SetActiveCell)
[Scripting Members](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members)