sScrollY changes column widths
sScrollY changes column widths
I have a datatable that is using the underlying HTML table's widths to size the columns. Everything is great until I try to implement sScrollY, at which point all my column widths are slightly resized. I have bAutoWidth set to false. Any tips on how I can implement sScrollY while maintaining my original column widths? Any help is greatly appreciated! Great plug-in Allen!
This discussion has been closed.
Replies
Allan
1)
Thanks for your response. I have the same issue as well. So I tried to set the width like this
"aoColumnDefs" : [
{"sWidth": "5%", "aTargets":[0]},
{"sWidth": "50%", "aTargets":[1]},
{"sWidth": "25%", "aTargets":[2]},
{"sWidth": "20%", "aTargets":[3]}
],
but the columns are still not aligned :( I really do not like how this looks. There must be a way to solve this sScrollY problem.
2)
I also have another issue with sScrollY. For another table that I have on a different page, I set a first column to have check boxes inside of it and when the user selects the checkbox in the thead, then all the checkboxes are checked for all the rows (it has the check all effect). So, I set that event to happen when clicking select all, and it works, but when I enable the sScrollY, the check all box inside of my when clicked does not make the other rows' checkboxes be checked. For some reason, it removes the event handler I attached to these rows. I have no clue why! Any clue why this could be happening??
[If I need to start a new discussion because this is a bit separate issue, please let me know]
Thanks in advance!
2. I don't think it will be removing the event, but more likely the event isn't being applied. What is the selector you are using to add the event handler? Bare in mind that the header in a scrolling table is not inside the main table - it is broken out into its own table (have a poke at it with Firebug).
Allan