fnrender, IE9, and width

fnrender, IE9, and width

mourfmourf Posts: 2Questions: 0Answers: 0
edited April 2012 in DataTables 1.9
Hi,

I am currently using datatable + fixedcolumns on an extranet in my company.
One of the last problems I have and cannot find solution is :

I receive int values but I cannot show them like 12346 (ugly, blabla client blabla)
my coworkers solution was to show it as 123 456, but now we need sorting too.
123 456 is considered text, and every solution I have tried failed while using it this way.

So I went on leaving the number as 123456 and add the following code :

[code]"aoColumnDefs": [
{
"aTargets": [4, 5, 7, 8, 10, 11, 13, 14, 17, 18],
"bUseRendered": false,
"fnRender": function (o) {
return o.oSettings.fnFormatNumber(parseFloat(o.aData[o.iDataColumn]));
}
][/code]

thanks to this, I now have 123,456 and it is properly sorted

BUT (of course, where is the fun without a "but"), on IE, the targeted cells have a tiny difference between header width and cells width.
After hard brainstorm to think about what shoud be doing this, I must admit that I am pretty sure the difference come with the "," added to the cells values, as if on IE the auto width determination is done before fnrender, for the header.

here is a link to an image so you can see my point. I tried to show values with "," in those columns :

http://tof.canardpc.com/view/5a90d9aa-9126-4500-8cfa-d9f5fdddd0f3.jpg

I might be wrong but this is the only explanation I can find

Replies

  • mourfmourf Posts: 2Questions: 0Answers: 0
    My bad, I removed the "aoColumnDefs" part of my code and the problem is still there

    still, I cannot find why it should be doing it only on IE (9, currently) (sorry, I cannot give a link to show the site)
This discussion has been closed.