Spread for ASP.NET 9.0 Product Documentation
onAutoFilteringColumn

Occurs when the user filters the column.

Syntax

[Inline HTML]

<ELEMENT onAutoFilteringColumn = "handler" ...>

[Event Property]

FpSpread1.onAutoFilteringColumn = handler

[Named Script]

<SCRIPT FOR=FpSpread1 EVENT=onAutoFilteringColumn>

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
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>
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback