How to format/mask/filter data
How to format/mask/filter data
Let's say I have the columns id, title and datetime. The columns id and datetime are both integer and title is a string. now I want to alter the values that are being displayed so that the title becomes a link e.g.
[code]
%title%
[/code]
and that datetime is transformed from a integer value to a format like Month dd, Year. Of course all the colums have to be sortable on the original values. Is this even possible and so how do I apply these masks/formats?
[code]
%title%
[/code]
and that datetime is transformed from a integer value to a format like Month dd, Year. Of course all the colums have to be sortable on the original values. Is this even possible and so how do I apply these masks/formats?
This discussion has been closed.
Replies
[code]
"aoColumns": [
{ "bVisible": false },
{
"fnRender": function ( oObj ) {
return '' + oObj.aData[1] + '';
}
},
null,
{
"fnRender": function ( oObj ) {
d = new Date(oObj.aData[3]*1000);
var jm=["January","February","March","April","May","June","July","August","September","October","November","December"]
return d.getDate() + ' ' + jm[d.getMonth()] + ', '+ d.getFullYear();
}
},
null
]
[/code]