problem sorting in FixedColumns
problem sorting in FixedColumns
I all,
this is my simple code :
$(document).ready( function () {
var oTable = $('#tabella5').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "120%",
"bScrollCollapse": true
} );
new FixedColumns( oTable, {
"iLeftColumns": 2,
"iLeftWidth": 250
} );
} );
it sorting well when table not contains tags, for example like this :
<?php echo number_format($var1,2);?>
<?php echo number_format($var2,2);?>
.....
.....
vars are percentuals.
but it don't sort columns when I add any HTML tags in TD tags like this :
<?php echo number_format($var1,2);?>
<?php echo number_format($var2,2);?>
.....
.....
Can anyone tell me why ?
TNX ALL
this is my simple code :
$(document).ready( function () {
var oTable = $('#tabella5').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "120%",
"bScrollCollapse": true
} );
new FixedColumns( oTable, {
"iLeftColumns": 2,
"iLeftWidth": 250
} );
} );
it sorting well when table not contains tags, for example like this :
<?php echo number_format($var1,2);?>
<?php echo number_format($var2,2);?>
.....
.....
vars are percentuals.
but it don't sort columns when I add any HTML tags in TD tags like this :
<?php echo number_format($var1,2);?>
<?php echo number_format($var2,2);?>
.....
.....
Can anyone tell me why ?
TNX ALL
This discussion has been closed.
Replies
You will probably need to force natural or numeric sorting on your columns.
See http://datatables.net/release-datatables/examples/basic_init/table_sorting.html and http://datatables.net/plug-ins/sorting
@mephjl - look at the Numbers with HTML plug-in.
Allan