Weird behavior using rowGroup & Buttons extension
Weird behavior using rowGroup & Buttons extension

I am having trouble with correctly displaying contents in datatable. Basic functionality works fine but issue occurs when buttons (button extension) is clicked the datatable rowgroup is shifted to right side instead of hiding the columns which is specified in the button configuration. Seems like clicking button recalculates colspan and thus making all cells shift to right.
This is what I have done so far (jsfiddle) https://jsfiddle.net/wj5rac4d/ and jsfiddle.net/8n9xbLkd/
Any help is highly appreciated. Thanks
Stackoverflow: https://stackoverflow.com/q/55974038/7793817
Answers
I think we are hitting this. When the column visibility is changed, RowGroup isn't currently taking into account that you might have defined your own columns for the grouping row.
In fact I don't think your own code for the rendering callback is either - it doesn't check to see what columns are visible and alter the number of cells to be returned based on that.
Allan
Thank for quick reply Allan. I used example from here. Any idea/workaround/example would be really helpful.
@allan I mean from here
Hi @alvindotnetdeveloper ,
As Allan said, the
startRender
isn't considering which columns are hidden or not, so it's creating<td>
elements for columns which aren't visible, thus screwing up those header rows.The fix would be in the
startRender
function, to call eithercolumn().visible()
for each column, orcolumns().visible()
, to determine whether that header column should be created.Cheers,
Colin