SpreadJS Documentation
openFilterDialog Method
The hit test information about the filter button.
Opens the filter dialog when the user clicks the filter button.
Syntax
var instance = new GcSpread.Sheets.RowFilterBase(range);
var value; // Type: any
value = instance.openFilterDialog(filterButtonHitInfo);
function openFilterDialog( 
   filterButtonHitInfo : Object
) : any;

Parameters

filterButtonHitInfo
The hit test information about the filter button.
Example
This example uses the openFilterDialog method.
<!DOCTYPE html>
<html>
<head>
    <title>SpreadJS</title>
    <!--jQuery References-->
    <script src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script>

    <link href="http://cdn.grapecity.com/spreadjs/hosted/css/gcspread.sheets.excel2013white.9.40.20153.0.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="http://cdn.grapecity.com/spreadjs/hosted/scripts/gcspread.sheets.all.9.40.20153.0.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            var spread = new GcSpread.Sheets.Spread($("#ss").get(0));
            var sheet = spread.getActiveSheet();
            spread.isPaintSuspended(true);
            for (var i = 0; i < 10; i++) {
                sheet.setValue(i, 0, i);
            }
            sheet.rowFilter(new GcSpread.Sheets.HideRowFilter(new GcSpread.Sheets.Range(1, 0, 10, 1)));
            spread.isPaintSuspended(false);
            $("#btn").click(function () {
                sheet.rowFilter().openFilterDialog(sheet.hitTest(97, 30).filterButtonHitInfo);
            })
        });
    </script>
</head>
<body>
    <div id="ss" style="width:100%;height:500px;border:1px solid gray"></div>
    <input type="button" id="btn" value="Click" />
</body>
</html>
See Also

Reference

RowFilterBase type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.