multiple sType for the column
multiple sType for the column
blaazetech
Posts: 5Questions: 0Answers: 0
hi allan,
am having data in mixed mode like currency wrapped in html link
[code]$2,834.98[/code]
and am unable to figure out the sorting issue as i cannot specify multiple sType for this.
any help is deeply appreciated.
thnx
blaaze
am having data in mixed mode like currency wrapped in html link
[code]$2,834.98[/code]
and am unable to figure out the sorting issue as i cannot specify multiple sType for this.
any help is deeply appreciated.
thnx
blaaze
This discussion has been closed.
Replies
Also, DataTables 1.10 will be able to sort this kind of data by numbers automatically :-).
Allan
i hope you didn't got my point, the data inside the html link is some currency which needs some custom handling, i cannot use currency and html stypes at once. i have edited the in my prior post, check again.
thnx
blaaze
Or you could try the 1.10 dev code ( https://github.com/DataTables/DataTables/tree/1_10_wip ) which has this feature built in.
Allan
[code]$.fn.dataTableExt.oApi.fnReloadAjax = function ( oSettings, sNewSource, fnCallback, bStandingRedraw )
{
if ( sNewSource !== undefined && sNewSource !== null ) {
oSettings.sAjaxSource = sNewSource;
}
// Server-side processing should just call fnDraw
if ( oSettings.oFeatures.bServerSide ) {
this.fnDraw();
return;
}
this.oApi._fnProcessingDisplay( oSettings, true );
var that = this;
var iStart = oSettings._iDisplayStart;
var aData = [];
this.oApi._fnServerParams( oSettings, aData );
oSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, aData, function(json) {
/* Clear the old information from the table */
that.oApi._fnClearTable( oSettings );
/* Got the data - add it to the table */
var aData = (oSettings.sAjaxDataProp !== "") ?
that.oApi._fnGetObjectDataFn( oSettings.sAjaxDataProp )( json ) : json;
for ( var i=0 ; i
Allan
Allan
an example code will help me a lot, as am a kind of intermediate user.
your code helps me a lot.
thnx