Spread for ASP.NET 9.0 Product Documentation > Client-Side Scripting Reference > Scripting Members > Events > onAutoFilteringColumn |
Occurs when the user filters the column.
[Inline HTML]
<ELEMENT onAutoFilteringColumn = "handler" ...>
[Event Property]
FpSpread1.onAutoFilteringColumn = handler
[Named Script]
<SCRIPT FOR=FpSpread1 EVENT=onAutoFilteringColumn>
None
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.
This example JavaScript code maps the event for the Spread on the client side.
JavaScript |
Copy Code
|
---|---|
<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> |