Sorting with render problem

Sorting with render problem

jaco01jaco01 Posts: 1Questions: 1Answers: 0

I am trying to sort my column with rendered values, but it still order by original data. Can you help me?
Just displaying works fine. Filtering also doesn't work but this is not a problem now.

{"data":0,
    render: function ( data, type, row ) {
            var ms= new Date(row[1]).getTime(); 
            var now = $.now(); 
            var offset = data*24*3600*1000; 
            var rok= (ms+offset)-now;
            if ( type == 'type' || type == 'sort' ){
                return  rok;
            }
            if ( type == 'display' || type == 'filter' ){
                return  Math.round(rok/1000/3600/24) + ' (' + data + ')' ;
            }
    }
},

Answers

This discussion has been closed.