displaytag in portal, problem with using dataTable & fixed Column

displaytag in portal, problem with using dataTable & fixed Column

dtomsu_wpsdtomsu_wps Posts: 2Questions: 0Answers: 0
edited August 2011 in Bug reports
Hi, I am fairly new to jQuery dataTable,

I have built a table in the liferay portal in a portlet. Everything works fine, but when I use dataTables (with FixedColumns) on it, the view of the table gets distorted.

The Head and the body of the table are not any more together, but have a gap of approx. 20px between. The scrollable part is not in line with the fixed column any more. When there is only one row, the scrollable part of the table is not readable any more, it vanishes completely in the scroll bar.

This is the code for instantiating the dataTable:
[code]
$(document).ready( function () {
var oTable = jQuery('table.dataTable').dataTable( {
"sScrollY": "300px"
,"sScrollX": "100%"
,"sScrollXInner": "150%"
,"bScrollCollapse": true
, "bPaginate": false
} );
new FixedColumns( oTable );
} );
[/code]

The table is surrounded with a div, the table is standard with th and td part, built by the wonderful displaytag library.

Same behaviour and view in FF, Chrome and IE9.

I guess the theme is adding some pixels to the y-coords, so that they get calculated wrongly.

There are no errors in the console, I am using datatable plugin 1.8.1, I have tried with the bundled jQuery 1.6.1 and the latest version 1.6.2, but to no good, so far. I can provide pictures to demonstrate, but I don't know how to do this in the forum.

Is there any workaround for my problem?

Best Regards, Daniel

Replies

  • dtomsu_wpsdtomsu_wps Posts: 2Questions: 0Answers: 0
    Hi, myself again.

    I have experimented a little with the standard displaytag.css.

    There were some entries with margin in there, by removing them, the distorted views were fixed.

    So now, it works very well.

    Best Regards, Daniel
This discussion has been closed.