enabled

enabled – enables the filtering of the grid. When build in filtering is enabled the grid renders additional row under the headers and each column contains corresponding filter widget. If the grid’s data source does not have scheme-a with fields all column are treated as string and shieldTextBoxes are rendered under each column headers.


    $(function () {
        $("#grid").shieldGrid({
            dataSource: {
                data: gridData,
                schema: {
                    fields: {
                        id: { type: Number },
                        name: { type: String },
                        company: { type: String },
                        phone: { type: String },
                        age: { type: Number }
                    }
                },
            },
            filtering: {
                enabled: true
            },
            paging: true,
            columns: [
                { field: "id", width: "250px", title: "ID" },
                { field: "name", title: "Person Name", width: "250px" },
                { field: "company", title: "Company" },
                { field: "phone", title: "Phone", width: "250px" },
                { field: "age", title: "Age" }
            ]
        });
    });