Filter on Enter keypress

Filter on Enter keypress

sigmondsigmond Posts: 3Questions: 1Answers: 0
function initClass() {
    _grid.dataTable({
        select: { style: "os" },
        deferRender: true,
        lengthMenu: [[10, 20, 50, 100, 500], [10, 20, 50, 100, 500]],
        iDisplayLength: 20,
        sScrollY: 550,
        scrollCollapse: false,
        order: [[1, "asc"]],
        columns: [
            { data: "Lock", width: 25, render: renderLock },
            { data: "DataID" },
            { data: "_TypeDataOrigin_Name" },
            { data: "AssignedTo" },
            { data: "PropertyType" },
            { data: "City" },
            { data: "State", width: 50, visible: true },
            { data: "AbstractStatus", width: 100 },
            { data: "Address", visible: true },
            { data: "DateCreated", visible: true, render: JLL.DateUtil.formatJsonAsStdDate },
            { data: "DateAssigned", visible: true },
            { data: "DateCompleted", visible: true }
        ]
    });
    _table = _grid.DataTable();
    $('.dataTables_filter input').unbind();
    $('.dataTables_filter input').bind('keyup', function (e) {
        if (e.keyCode == 13)
            _table.fnFilter(this.value);
    });     
    _table.on("select", onSelectionChanged);
    _table.on("deselect", onSelectionChanged);
}

Answers

  • sigmondsigmond Posts: 3Questions: 1Answers: 0

    I am getting the error on line 29:
    Object doesn't support property or method 'fnFilter'

    Q: What am I doing wrong?
    Q: What is the proper way to do this?

    NOTE: I can access_table.rows() and _table.columns()

  • sigmondsigmond Posts: 3Questions: 1Answers: 0

    BTW - Using 1.10

This discussion has been closed.