New plug-ins: ColVis (column visibility control) and FixedColumns (frozen scrolling columns)
New plug-ins: ColVis (column visibility control) and FixedColumns (frozen scrolling columns)
Hello all,
It's great to be able to announce two new plug-ins for DataTables. Each has it's own discussion thread with more details, but as a quick summary:
ColVis:
Provide the end-user with the ability for them to show and hide columns in a table.
Discussion: http://datatables.net/forums/comments.php?DiscussionID=2814
Example: http://datatables.net/release-datatables/extras/ColVis/
FixedColumns:
Fix (freeze) the left-hand column of the table when scrolling along the x-axis.
Discussion: http://datatables.net/forums/comments.php?DiscussionID=2815
Example: http://datatables.net/release-datatables/extras/FixedColumns/index_column.html
Hope you enjoy them!
Regards,
Allan
It's great to be able to announce two new plug-ins for DataTables. Each has it's own discussion thread with more details, but as a quick summary:
ColVis:
Provide the end-user with the ability for them to show and hide columns in a table.
Discussion: http://datatables.net/forums/comments.php?DiscussionID=2814
Example: http://datatables.net/release-datatables/extras/ColVis/
FixedColumns:
Fix (freeze) the left-hand column of the table when scrolling along the x-axis.
Discussion: http://datatables.net/forums/comments.php?DiscussionID=2815
Example: http://datatables.net/release-datatables/extras/FixedColumns/index_column.html
Hope you enjoy them!
Regards,
Allan
This discussion has been closed.
Replies
IE8.0 says this:
Unknown runtime error ColVis.js, line 297 character 3
line 297: nSpan.innerHTML =
''+
''+oColumn.sTitle+'';
Thank's Allan!
Good shout - thanks for catching that and letting me know (a bit embarrassed that slipped through!). I've updated the package to fix a couple of little issues with IE - and it can be downloaded from here: http://datatables.net/releases/ColVis-1.0.1.zip .
Regards,
Allan
Thanks!
Allan
Thank you very much!
Allan
Allan
I use Colvis on a datatable with 54 columns. I've excluded 50 columns with aiExclude, now when i press the show/hide button the first time the container loads above the button instead of underneath it. The second time i press it the container loads on the right side of the button. Does anybody knows what's wrong??
[code]
/* Visual corrections to try and keep the collection visible */
var iDivWidth = $(nHidden).outerWidth();
var iDivHeight = $(nHidden).outerHeight();
if ( iDivX + iDivWidth > iDocWidth )
{
nHidden.style.left = (iDocWidth-iDivWidth)+"px";
}
if ( iDivY + iDivHeight > iDocHeight )
{
nHidden.style.top = (iDivY-iDivHeight-$(this.dom.button).outerHeight())+"px";
}
[/code]
This calculation appears to be the culprit, because if I comment it out it displays as expected every time:
[code]
/* Visual corrections to try and keep the collection visible */
/* 2010.11.20 => Removed by Rob Brennan to prevent against "empty" rectangle
var iDivWidth = $(nHidden).outerWidth();
var iDivHeight = $(nHidden).outerHeight();
if ( iDivX + iDivWidth > iDocWidth )
{
nHidden.style.left = (iDocWidth-iDivWidth)+"px";
}
if ( iDivY + iDivHeight > iDocHeight )
{
nHidden.style.top = (iDivY-iDivHeight-$(this.dom.button).outerHeight())+"px";
}
*/
[/code]
Thanks,
Allan
@Allan, where can I drop a link..? my project has got a lot of private info in it ;)