Assigning a custom comparitor to order a column
Assigning a custom comparitor to order a column
Say for instance I have this table:
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/s/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.10,b-1.1.0,b-html5-1.1.0/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/s/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.10,b-1.1.0,b-html5-1.1.0/datatables.min.js"></script>
<script>
$(function() {
$("#dat").DataTable();
});
</script>
</head>
<body>
<table id="dat">
<thead>
<tr>
<th>First Col</th>
<th>Second Col</th>
</tr>
</thead>
<tbody>
<tr>
<td>ABC-201</td>
<td>7</td>
</tr>
<tr>
<td>ABC-1200</td>
<td>2</td>
</tr>
</tbody>
</table>
</body>
</html>
What I would liket to do is create and assign a custom comparitor to order the first column but leave the others to order via default methods, is this possible?
This discussion has been closed.