Ordering is only working for first column.
Ordering is only working for first column.
Hi all I have similar questions regarding ordering/searching/sorting feature of data tables,
First of all I have looked the example given here
https://datatables.net/examples/plug-ins/dom_sort.html and for me the sorting is not working for the last column that is the one with the select box so if I write lest say Tokyo the rows containing Tokyo does not filter out. Although I am seeing the code there
$.fn.dataTable.ext.order['dom-select'] = function ( settings, col )
{
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
return $('select', td).val();
} );
}
One more thing right now I am using 1.9.4 version of data table and what my requirement is my table has three columns first columns can have selectbox or input box, second will have select box and thrird should again have selectbox/inputbox in it.
But I am stuck at a point that if my first column contains input boxes and second contains select boxes then sorting is not working for the second column. as shown here.
http://jsfiddle.net/aC4JT/28/
If my first column is selectbox and Second is input box then sorting/ordering works for both of the columns as shown here
http://jsfiddle.net/aC4JT/27/
And if both of my columns are selectboxes than sorting/ordering is not working for any of them as shown here.
http://jsfiddle.net/aC4JT/32/
I am totally confused what I am doing wrong here. Need help of experts. Also please not that right now I can not upgrade to 1.10, and is is possible to achieve the functionally that I want with 1.9.4
Thanks