search work only selected rows

search work only selected rows

rohit99rohit99 Posts: 16Questions: 5Answers: 0

datatable search work only selected rows

Answers

  • rohit99rohit99 Posts: 16Questions: 5Answers: 0

    datatable search only checked rows. we use custom filter

    var _table = $('#tblFlowdown').DataTable();

            _table.columns(col).search('\\b' + txt, true).draw();
    
            $.fn.dataTable.ext.search.push(
               function (settings, data, dataIndex) {
                    if (($(_table.row(dataIndex).node()).hasClass('expFlowDown-selected'))) {
                       return true;
                   } else {
                        return false;
                    }
                }
            );
            _table.columns(col).search('\\b' + txt, true).draw();
            $.fn.dataTable.ext.search.pop();
    

    but not work fine

  • rf1234rf1234 Posts: 472Questions: 31Answers: 63

    "but not work fine"
    Could you be slightly more specific about the issue that you have. Many thanks!

  • allanallan Posts: 44,186Questions: 1Answers: 5,869 Site admin

    Ideally with a link to a test case showing the issue please.

    Allan

Sign In or Register to comment.