How to sort column by keyword?
How to sort column by keyword?

Hi, I am try to sort column by keyword. In last column named "status" there are "active", "inactive" & "deleted" data. I wanna sort "active" data first then "inactive" and then "deleted" .
$(document).ready(function() {
$.getJSON("api/ItemList.json", function(data) {
var table = $('#list').DataTable({
data: data.Success.Body.Item,
columns: [{
data: 'Category'
},
{
data: 'Attributes.name'
},
{
data: 'Inventory.0.Status'
}
]
});
});
});
This discussion has been closed.
Answers
You would use Ortogonal Data for this. For example using
columns.render
you can assign numeric values toactive
,inactive
anddeleted
for thesort
operation to sort in the order desired.Kevin
Sorry, documentation not helping much

Here is an example:
http://live.datatables.net/yaqizefu/1/edit
Kevin