Duplicate value suppression
Duplicate value suppression
Hi. Amazing job you've done with this. I'm using it as part of the WP-Table reloaded plugin for WordPress.
What I'd like to be able to do - which I don't think is currently supported - is to suppress cells where the cell above has the same value.
I think it should be a column property. By example, the following table...
A 1 2
B 1 7
B 2 5
C 4 9
...with such a property set on the first column would become...
A 1 2
B 1 7
. 2 5
C 4 9
This would logically have to be applied according to the current sort, filter and viewport on the table.
Possible?
What I'd like to be able to do - which I don't think is currently supported - is to suppress cells where the cell above has the same value.
I think it should be a column property. By example, the following table...
A 1 2
B 1 7
B 2 5
C 4 9
...with such a property set on the first column would become...
A 1 2
B 1 7
. 2 5
C 4 9
This would logically have to be applied according to the current sort, filter and viewport on the table.
Possible?
This discussion has been closed.
Replies
I've done something similar - although not identical for this example: http://datatables.net/examples/advanced_init/row_grouping.html - it is checking duplicates and then inserting a new row to group things together. It might provide a useful starting point.
Allan
I have an 818 row table with 431 unique values in the first column, the rest being blank indicating repetition. I used to split the whole thing up manually (alphabetic ranges on that first column) but thought I could save myself a lot of hassle by using the pagination provided (to WP-Table reloaded) by DataTables. The trouble, of course, comes when the first row of a page is blank in that first column.
For now I shall just populate the blank cells with duplicate info. Not ideal but correct. I'm setting up a completely new version of my site and trying to avoid any customisation at a code level where possible.
It would be useful if this could be built in to DataTables. To my mind, this is a fairly common practice in print.
The raw data is in a Google Spreadsheet. I just created a new sheet which automatically copies the names down into the blank cells. Then I created another one that grabs from the 'has-blanks' sheet except on every 50th row, when it grabs from the 'no-blanks' sheet. I've then set paging to 50 and not user changeable. Bingo!