sorting with hyperlinks

sorting with hyperlinks

interactivevaluesinteractivevalues Posts: 1Questions: 0Answers: 0
edited April 2014 in General
Hi,
I have a simple table where the content in the first column contains html-tags (hyperlink).
I checked the documentation and there it looks like that sorting should exclude the html-tag automatically, but it looks like that the html-tags are included when I use:

$(document).ready(function() {
$('.tx_ivviscositytables').dataTable();
});


this is the debug-info of the col:

{
"aDataSort": [0],
"asSorting": ["asc", "desc"],
"bSearchable": true,
"bSortable": true,
"bUseRendered": true,
"bVisible": true,
"_bAutoType": true,
"fnCreatedCell": null,
"fnGetData": "function (oData, sSpecific) {
var innerData = mData( oData, sSpecific );

if ( oCol.mRender && (sSpecific && sSpecific !== '') )
{
return mRender( innerData, sSpecific, oData );
}
return innerData;
}",
"fnRender": null,
"fnSetData": "function (data, val) {
data[mSource] = val;
}",
"mData": 0,
"mRender": null,
"nTh": "Substance",
"nTf": null,
"sClass": "",
"sContentPadding": "",
"sDefaultContent": null,
"sName": "",
"sSortDataType": "std",
"sSortingClass": "sorting",
"sSortingClassJUI": "",
"sTitle": "Substance",
"sType": "string",
"sWidth": "200px",
"sWidthOrig": null,
"iDataSort": -1,
"sCellType": "td"
}

what can I do to exclude the html-tags when sorting?

thx in advance,

ToM

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Can you link to a test case showing the issue please. That should work as shown in this example: http://datatables.net/release-datatables/examples/advanced_init/html_sort.html

    Allan
This discussion has been closed.