When hiding columns, hide rows with empty cells

When hiding columns, hide rows with empty cells

brenseidbrenseid Posts: 1Questions: 0Answers: 0
edited July 2013 in General
I'm creating a version comparison page for my client's software. They'd like to be able to show/hide the different versions. I have the column toggle setup, but I'm running into a problem. When I hide certain versions (columns), sometimes the remaining versions do not have one of the listed features (rows). They'd like to have those rows hidden.

For example, hide '8.0' and '8.3' on the demo page I linked below. In that scenario, the rows like 'aMass Mailing,' 'aScheduled Imports Scheduled Reports Scheduled Utilities', and 'Case auto-assignment' should be hidden, because neither 7.0 nor 7.1 have those features.
http://epc-version-comparison.site44.com/

I've tried using some methods with filtering, but to no avail. Any suggestions?

Replies

  • allanallan Posts: 63,514Questions: 1Answers: 10,472 Site admin
    Thanks for the link and the clear explanation!

    Row removal (/hiding) is performed by filtering in DataTables, So what you could do is apply a custom filter to the table which will filter out any row which doesn't have a `•` character in it. Perhaps something like:

    [code]
    $.fn.dataTableExt.afnFiltering.push(
    function( oSettings, aData, iDataIndex ) {
    return aData.join(' ').indexOf('•') !== -1;
    }
    );
    [/code]

    Regards,
    Allan
This discussion has been closed.