jquery DataTables. How to get filtered (visible) rows

后端 未结 7 1363
盖世英雄少女心
盖世英雄少女心 2021-02-07 02:28

I have a button that apply filter to jquery datatable

$(\"#buttonFilter\").button().click(function() {
                if (lboxColor.val() != null) {
                    


        
相关标签:
7条回答
  • 2021-02-07 03:13

    In current versions selector-modifier uses a slightly different set of properties.

    var table = $('#example').DataTable();
    var rows = table.rows({"search" : "applied"});
    

    And you can iterate over the cell data like this:

    table.rows({"search":"applied" }).every( function () {
        var data = this.data();
    });
    

    Some helpful links:

    • https://datatables.net/reference/api/rows()
    • https://datatables.net/reference/type/selector-modifier
    • https://datatables.net/reference/api/rows().every()
    0 讨论(0)
提交回复
热议问题