Re Filtering in datatables 1.10
Re Filtering in datatables 1.10
Hi,
I'm struggling with filtering using Datatables 1.10.
Before moving to 1.10, I had a web page that contained two datatables. Firstly, a groupedResultsTable. Secondly, a detailedResultsTable.
When I clicked on a row in the grouped results table, this filtered the detailed results table. I achieved this by adding a column in each table, which was then hidden. This column is a 'key' column. So, when clicking on on the groupedResultsTable, I teased the key out of that row, and passed it in to the detailedResultsTable filter.
E.g.....
$('#groupedResultsTable tbody ').on('click','tr', function () {
var rowId = groupedTable.row(this).index();
var key= groupedTable.cell(rowId, 14);
detailedTable.fnFilter(key.data(),9);
} );
This worked perfectly well, but with the new filter function, I'm struggling to see how I can pass the key from the grouped table into by detailed table.
Thanks in advance for any suggestions.....
Chris
This question has an accepted answers - jump to answer
Answers
Not sure on how you "pass it" from table to table, but you can take a look at the yadcf showcase and read the docs to see if it fits you
It looks like you are already part using the 1.10 API. I've made two changed:
cell()
directly rather than needing to get the row indexcolumn().search()
rather than fnFilter.Allan
Hi,
Big help, worked a treat, thank you.
Chris