RowGroup extension and hidden columns, last grouprow column not hidden?
RowGroup extension and hidden columns, last grouprow column not hidden?
Dalex73
Posts: 30Questions: 4Answers: 4
Hi,
I'm currently adding the rowgroup extension to my table for showing to total sums in two columns in the grouprow. This works fine but if the user hides one of the columns containing the data for one of the grouprow columns I want that hidden as well. So I have added the following which semi works. The columns are hidden correctly for all except the last group row on all pages, so is this the correct way to do it or should it be done in a better way?
startRender: function ( rows, group ) {
var api = rows;
if(api.column( 5 ).visible() === false)
{
$('.group-units').addClass('hidden');
}
if(api.column( 6).visible() === false)
{
$('.group-marketvalue').addClass('hidden');
}
//more code here....
}
},
This discussion has been closed.
Answers
Ok, looked at the result a bit more it's not always the last row but the issue occurs when the grouped data goes over two pages that's when the column does not get the class hidden.