FixedColumns - is more excel-like freezing behavior possible?
FixedColumns - is more excel-like freezing behavior possible?
Is it possible to achieve a more excel-like freezing behavior with FixedColumns plugin, that is, is it possible that even the last scrollable column could be compared side by side with the last fixed one. Currently the scrolling doesn't cover the whole range of columns.
See here in Columns > Freeze columns section
http://paramquery.com/demos
Regards,
Artjom
See here in Columns > Freeze columns section
http://paramquery.com/demos
Regards,
Artjom
This discussion has been closed.
Replies
Try the 2.5.0-dev version - the scrollbar covers the full table width: https://github.com/DataTables/FixedColumns/blob/master/media/js/dataTables.fixedColumns.js .
That that isn't what you are looking for, could you elaborate on what you mean please?
Allan
The problem we have with fixed columns is that in order to cover an adequate scrolling distance the sScrollX option have to be adjusted what makes the columns wider. What I need is the table with a fixed viewport and that is scrollable till the very last column. See illustration
https://dl-web.dropbox.com/get/Public/sketch-01.png?w=AABGLOCTnUhXOW26DpOcOvp2DE1vrQmngFqJySiOfg_9Rw
Allan
If you will follow this link http://paramquery.com/demos
and will go to Columns > Freezed Columns section then you will see exactly what I mean.
Yes, that's currently not possible I'm afraid, but I suspect probably not too difficult to implement. I've bookmarked this discussion for consideration as a future enhancement of FixedColumns. Thanks!
Allan
Allan
Chrome is unable to properly render it at all and IE10 seems to be OK.
See the test case in here - http://live.datatables.net/ekajav/5/
It seems that horizontal scrollbar is not accounted for in this case. Also the fixed part is transparent. Is it supposed to be like this?
Thanks for the test case.
Allan
with other browsers. Here is my report on encountered problems. I'll just leave it in here.
IE8 - alignment issues:
http://www.freeimagehosting.net/newuploads/mqqcs.png
IE9 - alignment issues:
http://www.freeimagehosting.net/newuploads/qas9c.png
IE10 - OK
Firefox - 1. vertical scrollbar is always visible; 2. alignment issues due to vertical scrollbar:
http://www.freeimagehosting.net/newuploads/d2nzf.png
Chrome - major issues
Alan, is there a fix for vertical scrollbar issue that creates misalignment of columns that is present in both firefox and chrome?
This problem is also reproducible in our development environment (it happens from time to time).
Allan
Allan
Allan
http://stackoverflow.com/questions/20474564/uncaught-typeerror-cannot-read-property-style-of-undefined-using-fixedcolumns
Basically, I'm trying to fix the two left columns in my datatable. I can fix the two left columns with this code:
[code]
var fixedTable = new FixedColumns( dTable, {
"iLeftColumns": 2,
"iLeftWidth" : 133
} );
[/code]
This is causing two problems:
1) I'm getting the following error:
Uncaught TypeError: Cannot read property 'style' of undefined from this section of my code:
[code]
/* Apply custom sizing to the cloned header */
var nThs = _fnGetUniqueThs( oSettings, nTheadClone );
iCorrector = 0;
for ( i=0 ; i
Allan
[code]
nThs[i-iCorrector].style.width = "";
[/code]
I thought maybe it was because of the fixed width, or maybe because my datatables are responsive and contained in a twitter bootstrap container, that it was causing some issue with width. but i'm not sure. I don't know why that line is there honestly. I am a new programmer with about 2 months experience.
Do you have a link for the 1.10 pre beta on git? I had downloaded your FixedColumns.min.js a few days ago from the downloads page.
Thanks Allan, your prompt responses are great.
An error on that line normally indicates that there is a mismatch between aoColumns / aoColumnDefs, and the columns in the thead, tbody and tfoot. But without being able to see the page, I can't say for sure what it is.
Allan
thank you for letting me know, i'll try and look into that. By mismatch, do you mean number of columns matching headers or something? I had the datatable working completely correctly and all lined up before using fixedcolumns, so that's why I thought the issue was purely in fixedcolumns. And yes, my page is company only, so I can't post it, i know this limits your ability to help, but any more information you know from past issues would be very much appreciated.
Yes, but it was a cumulation of lots of changes. So no easy fix.
> By mismatch, do you mean number of columns matching headers or something?
Typically yes. The error you indicate suggests that there is a mismatch somewhere, since it is trying to get a cell which isn't present.
> so that's why I thought the issue was purely in fixedcolumns
It might well be! I'm afraid I'm purely guessing since I don't have all the facts - sorry!
Allan
I thought i needed to, so I put jquery 1.10.1, and a lot of my information is not showing up in my datatables anymore and when I try to switch to other tabs with more datatables, I get errors like these:
[code]
Uncaught TypeError: Object [object Object] has no method 'match' jquery.dataTables.js:4039
Uncaught Error: Syntax error, unrecognized expression: ##station-tab jquery.js:4
crew stations 66 views.trains.schedule.js?ts=1386708111794:772
Uncaught TypeError: Object [object Object] has no method 'match' jquery.dataTables.js:4039
Uncaught TypeError: Object [object Object] has no method 'match'
[/code]
any guesses / suggestions are very welcome. Thanks so much, Allan.
Line 4039 in the current 1.10 dev version is this: https://github.com/DataTables/DataTables/blob/1_10_wip/media/js/jquery.dataTables.js#L4039 .
I've seen that error before when an old version of jQuery UI is used. They incorrectly uses a jQuery internal parameter and broke things. Which version of jQuery UI are you using (assuming you are using it) - if not the latest, try updating.
Allan
[code]
Uncaught TypeError: Cannot read property '0' of undefined FixedColumns.min.js:36
(anonymous function)
[/code]
as for the "match" error, all I found online was it couldn't match a string or something and that most people add .html(); to the end of lines to fix it. I think all of these errors are very confusing since it doesn't point out what is wrong in my code, but in all the files I am downloading (fixedColumns, jquery-ui.js, etc.) I'm not that experienced of a programmer to know what to do in order to resolve these issues...
You probably can't help anymore, but if you do think of anything, I'm always open for help. Thanks again, Allan.
Allan
what versions of bootstrap and jquery are your datatables 1.10 and FixedColumns 2.0.3 compatible with? I had downloaded the new jquery 1.10.1 and I'm getting errors in FixedColumns with
Uncaught TypeError: Cannot read property 'msie' of undefined
from lines like this:
[code]
"bOldIE": ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0"))
[/code]
that imply FixedColums doesn't support jquery above 1.9. Since The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9.
That's the problem. Use the 2.5.0-dev nightly version from http://datatables.net/download .
Allan