Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82031

Set the search field's value and sort the dataTable

$
0
0

Hello,
I retrieve the cell's value on double click and set the search's value to the cell's value in order to sort by the cell's value.
The issue I have is the dataTable is not updating when I set the search's value, it only works when I type on keyboard.
Is there a way to make it works as I expected ?

Here's my code :

$(document).ready(function() {

    $('#dataTables tbody').on('dblclick', 'td', function () {
    searchValue = currentTable.cell(this).data();
    });
});
'rowCallback': function(row, data, index) {
            $(row).dblclick(function() {
                $('#dataTables_filter input').val(searchValue);
            });
}

Thank you !


Viewing all articles
Browse latest Browse all 82031

Trending Articles