fixed header not working on IE 8
fixed header not working on IE 8
santiagozky
Posts: 8Questions: 0Answers: 0
Hello everyone.
I have been playing with the fixed header plugin and I manage to make work in IE 7 and firefox. But with IE8 it will only work if I click the compatibility button next to the address bar.
My initialisation is pretty simple:
[code]
oTable=$('#example').dataTable( );
$.fn.dataTableExt.FixedHeader( oTable );
$("th").addClass("bgBlanco"); // to add a white background to the header
[/code]
the json only contains the data, columns and a footerCallback. Any ideas of what can I do to fix this?
I have been playing with the fixed header plugin and I manage to make work in IE 7 and firefox. But with IE8 it will only work if I click the compatibility button next to the address bar.
My initialisation is pretty simple:
[code]
oTable=$('#example').dataTable( );
$.fn.dataTableExt.FixedHeader( oTable );
$("th").addClass("bgBlanco"); // to add a white background to the header
[/code]
the json only contains the data, columns and a footerCallback. Any ideas of what can I do to fix this?
This discussion has been closed.
Replies
That's odd. Does this demo work for you in IE8: http://datatables.net/release-datatables/extras/FixedHeader/ ? It works for me in IE8 under Vista and XP. Beyond that, it might be worth running your page thought the W3C validator?
Regards,
Allan
I corrected a few thing in the html and the validator says it is valid (4.01 strict). But the problem is not yet solved.
I think the problem is that I need to show a dynamic number of columns according to what the json says.
My json looks like this:
[code]
{"aaData":[["000052615","0002PEOP","TEST","0203464","0.01","2009-10-05 18:33:35.0"],["000052616","0002PEOP","TEST2","0203464","0.01","2009-10-05 18:34:16.0"],["000052617","0002PEOP","TEST10","0203464","0.01","2009-10-05 18:36:13.0"],["000049745","0002PEOP","TEST","0203464","0.04","2009-08-24 19:36:38.0"],["000050041","0002PEOP","TEST2","1234567890","0.01","2009-08-28 16:14:10.0"],["000050047","0002PEOP","TEST5","0203464","0.01","2009-08-28 16:17:19.0"],["000049781","0002PEOP","PRUEBACA","1597531","0.01","2009-08-25 12:14:27.0"],["000049900","0002PEOP","TEST","0203464","0.01","2009-08-26 13:13:16.0"],["000050471","0002PEOP","TEST","1234455","0.01","2009-09-07 12:06:29.0"],["000050472","0002PEOP","TEST2","1234455","55","2009-09-07 12:06:59.0"],["000050475","0002PEOP","PROBANDO TEAR","0203464","100","2009-09-07 12:40:54.0"],["000050476","0002PEOP","12345","0203464","56","2009-09-07 12:46:23.0"],["000050030","0002PEOP","TEST","1234455","0.01","2009-08-28 14:33:55.0"],["000050096","0002PEOP","TEST","0203464","0.01","2009-08-31 12:37:39.0"],["000050106","0002GMAL0","TEST DEV ","0203464","1","2009-08-31 14:27:35.0"],["000050579","0002PEOP","TEST","1234455","0.01","2009-09-08 12:45:04.0"]],
"aoColumns":[{"sTitle":"TRANSACCION"},{"sTitle":"USUARIO"},{"sTitle":"REFERENCIA"},{"sTitle":"REFERENCIA2"},{"sTitle":"IMPORTE"},{"sTitle":"FECHA"}],
"fnFooterCallback":function (nRow, aasData, iStart, iEnd, aiDisplay ) {
$($(nRow).children()).remove();
for(var i=0;i
You are going to run into on problem immediately - DataTables doesn't currently support dynamic columns... You can't add and remove columns after initialisation. You can show and hide them ( http://datatables.net/examples/api/show_hide.html ), but you can't add and remove them... So all I can really suggest is that you have, say, 10 columns in the table, and then hide the columns that you don't want...
Regards,
Allan
Are there any plans to implement a dynamic columns feature? I haven't see the datatables code, where do I have to start looking If I want to implement a dynamic columns solution?
Thanks for your time. I am loving datatables
I don't have any plans to implement dynamic columns at the moment, but it is certainly something I can add to the to-do list. I suspect it wouldn't actually be all that hard, and indeed could almost be entirely done through plug-ins (the only part where this would fall over is in the automatic width calculation of the columns - which needs a reworking anyway...). All that the plug-ins would really need to do is add (or remove) elements from the column specific arrays, and create the new TD elements as needed.
Regards,
Allan