Table Data Scroll and PDF Formatting
Table Data Scroll and PDF Formatting
http://debug.datatables.net/uhifer
The page is http://nsfw.naipunyacloud.com/external
How do I get the table to be of the same size as the grey header and footer divs. I tried a few things but did not work. Also for some reason the head row is assigning width 155 to each column. I would like to leave the width dynamic so that it can change based on the column data.
Or else a good scroll inside the box would be good.
Also the PDF shows a unformatted PDF, would it be possible to get the PDF as it is showing on the screen.
Thanks in adavance
Srinivas
The page is http://nsfw.naipunyacloud.com/external
How do I get the table to be of the same size as the grey header and footer divs. I tried a few things but did not work. Also for some reason the head row is assigning width 155 to each column. I would like to leave the width dynamic so that it can change based on the column data.
Or else a good scroll inside the box would be good.
Also the PDF shows a unformatted PDF, would it be possible to get the PDF as it is showing on the screen.
Thanks in adavance
Srinivas
This discussion has been closed.
Replies
[code]
"sScrollX": "100%",
"sScrollXInner": "150%",
[/code]
And the header extends with the data, but the column sizes are too wide. How can I make the table columns a little more compact ?
[code]
"aoColumnDefs": [
{ "sWidth": "10%", "aTargets": [ '_all' ] }
]
[/code]
That helps a little. But if I keep the xScrollXInner at 150% the columns are getting stretched to make that size. I understand that the table will grow horizontally with columns. But looks like the xScrollXInner is calculating the total width and then distributing the column width equally.
Also the header is getting replaced by Div which are being sized based on the table column size. I think that is the ROOT cause here, to coordinate the header and the table column size.
Ideally if we can just have something like
1. Keep the header inside the Table in the TR tags
2. Add an outer dive to scroll the table inside
But this will make the header vertically scroll with the table. I guess that was the problem being addressed by the outside Div and tables.
But since this comes into play only on vertical scroll, and for the most part the tables are paginated. So chances are the header and all the rows will be in the visible area.
I guess it is a trade off between the vertical scrolling header vs the fixed size of the columns.
this is a really cool plugin, and I am evaluating this to use for some big projects. But the column sizing could be the dealbreaker here!!
Hope to get a solution soon
Srinivas