ColVis questions: opens but cannot close the column list, doc for grouping columns, fnRebuild crash

ColVis questions: opens but cannot close the column list, doc for grouping columns, fnRebuild crash

henrywhenryw Posts: 2Questions: 0Answers: 0
edited April 2013 in Bug reports
Great program, thanks! This morning I upgraded to ColVis 1.1.0-dev from the nightly download (I did this to fix Uncaught TypeError: Cannot read property 'msie' of undefined per discussion 13805). Now I have 3 issues:

1) you can open but not close the column list with the checkboxes

2) In the downloads/colvis/nightly/notes link you mention "Update docs with link to 'Grouping Columns'", tantalizing, but I can't find doc, can you please post the link?

3) ColVis.fnRebuild( oTable );
crashes with message Uncaught ReferenceError: ColVis is not defined
Details: in my prior code, right after the point where I initialize DataTables on my table, I list several invisible columns e.g. oTable.fnSetColumnVis(13, false ) and then I have the ColVis.fnRebuild( oTable ) statement. After I upgraded and got the crash, I commented out the fnRebuild. The table renders properly (hidden columns are not shown). Should I be concerned that 'ColVis is not defined'

Thanks

Replies

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Can you link to a test case please? See http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Regarding grouping, its not publicly documented yet because it hasn't been released yet. However, the example in the repo contains the required information: https://github.com/DataTables/ColVis/blob/master/group_columns.html

    Allan
  • henrywhenryw Posts: 2Questions: 0Answers: 0
    Allan,
    It's behind a firewall. it's easiest for me to give you VPN credentials, can you use Cisco AnyConnect VPN?
  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Probably... :-). You can PM me by clicking on my user name, or email me at my user name at datatables.net.

    Allan
  • henrywhenryw Posts: 2Questions: 0Answers: 0
    Item 2: Thanks, I want to try it because my table has 56 columns
    Item 3: Doesn't seem to be a problem

    Item 1: Can't close the list of column names with checkboxes - I found the bug. The ColVis initialization puts a div named ColVis_catcher into the DOM. It's intended to go over the 'Show/Hide Buttons' button ('activate button'). This div does indeed hide the buttons. The problem is that it gets appended to the bottom of the page when it's initialized, so it wanders away from the intended location. And since it's invisible, it took some sleuthing with your handy Visual Event program to find it.

    Here's the snippet from ColVis.js
    /**
    * An element to be placed on top of the activate button to catch events
    * @method _fnDomCatcher
    * @returns {Node} div container for the collection
    * @private
    */
    "_fnDomCatcher": function ()
    {
    var
    that = this,
    nCatcher = document.createElement('div');
    nCatcher.className = "ColVis_catcher TableTools_catcher";

    $(nCatcher).click( function () {
    that._fnCollectionHide.call( that, null, null );
    } );

    return nCatcher;
    },

    My page ends like this:
    ...



    <!-- end of div containing table of selected employee/campaigns -->
    <!-- end row 2 -->

    <!-- /container -->




    Confidential Information Copyright (c) Nutraceutical Corporation



    So ColVis_catcher is invisibly placed below the copyright notice - not a handy place for it to lounge around.
This discussion has been closed.