Hi,
I'm using the latest release and I cannot make the table header to be 100% and dynamically resized with the window. I found this example: http://datatables.net/release-datatables/examples/basic_init/flexible_width.html, which is quite useless because it doesn't give any indication as what was the html before the code was executed which is true for all the examples, btw. I added width attribute to the table with a value of 100%, I also added style with width set to 100%. I tried enabling/disabling bAutoWidth. I'm creating a table with the fnServerData, so the HTML is just this:
and I add all the rows later. When I generate the columns that I pass as aoColumns to the constructor, I don't give width to any of the columns. Later, I want to specify the width of some of the columns but I would like to see a working example. I see that it is working if I don't pass sScrollY which I need so that the table is scrollable.
Example: http://fiddle.jshell.net/ZGyuA/1/
DataTables debugger: http://debug.datatables.net/ivuxix
How can I fix this issue?
Thanks.
I'm using the latest release and I cannot make the table header to be 100% and dynamically resized with the window. I found this example: http://datatables.net/release-datatables/examples/basic_init/flexible_width.html, which is quite useless because it doesn't give any indication as what was the html before the code was executed which is true for all the examples, btw. I added width attribute to the table with a value of 100%, I also added style with width set to 100%. I tried enabling/disabling bAutoWidth. I'm creating a table with the fnServerData, so the HTML is just this:
<table id="table" width="100%"> <thead></thead> <tbody id="tableBody"></tbody> </table>
and I add all the rows later. When I generate the columns that I pass as aoColumns to the constructor, I don't give width to any of the columns. Later, I want to specify the width of some of the columns but I would like to see a working example. I see that it is working if I don't pass sScrollY which I need so that the table is scrollable.
Example: http://fiddle.jshell.net/ZGyuA/1/
DataTables debugger: http://debug.datatables.net/ivuxix
How can I fix this issue?
Thanks.