When hiding columns, hide rows with empty cells
When hiding columns, hide rows with empty cells
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?
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?
This discussion has been closed.
Replies
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