0

I am using a nattable with rows that represent different objects, including group by objects and an another objects.

Nattable - Before Issue

When I tried to hide row number 302, which represents an object, it is being hidden as expected. However, seeing an issue with row 303, which represents a group by object. Specifically, it seems that the group by object label is still visible, but the rows after row 303 are repeating the same group by object.

Nattable -Issue

Im using the following code :

bodyDataLayer = new GroupByDataLayer<>(groupByModel,GlazedLists.threadSafeList(GlazedLists.eventList(data)),    columnPropertyAccessor,configRegistry);

this.bodyDataProvider = (ListDataProvider) bodyDataLayer.getDataProvider();

GlazedListsEventLayer glazedlist = new GlazedListsEventLayer<>(bodyDataLayer,
                    ((GroupByDataLayer<T>) bodyDataLayer).getTreeList());


  dataChangeLayer = createDataChangeLayer(rowIdAccessor, bodyDataProvider, glazedlist);
            
columnReorderLayer = new ColumnReorderLayer(dataChangeLayer, columnReorderDefaultConfig);
   

 columnHideShowLayer = new ResizeColumnHideShowLayer(columnReorderLayer, bodyDataLayer);    

RowHideShowLayer rowHideShowLayer = new RowHideShowLayer(columnHideShowLayer);

Is there any way to resolve this issue. Help would be appreciated. Thanks!

greg-449
  • 109,219
  • 232
  • 102
  • 145

1 Answers1

1

The problem is that you are using the RowHideShowLayer which hides a row by row index. This is not working correctly in combination with GlazedLists features like GroupBy. For this you need to use the GlazedListsRowHideShowLayer which hides rows via row object ids.

The usage is shown in the NatTable Examples Application in Tutorial Examples - GlazedLists - GlazedListsRowHideShowExample or in Tutorial Examples - Integration - EditableSortableGroupByWithFilterExample.

Dirk Fauth
  • 4,128
  • 2
  • 13
  • 23