sorting with hyperlinks
sorting with hyperlinks
interactivevalues
Posts: 1Questions: 0Answers: 0
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
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
This discussion has been closed.
Replies
Allan