I was checking on NatTable Row Grouping Functionality. There is one example called PerformanceRowGroupingExample where there are different functionalities to group and ungroup the rows. What I wanted to know is when I Ungroup a row from a Group I saw the indexing of the rows is not getting changed i.e. they are not seen in a serial order 1,2,3....So I tried few things with rowreorderlayer to make the order proper but it didn't work. So If we have any solution for this will be helpful.
Row Grouping functionality
Indexing after ungrouping a row from a group
I have tried few ways to re index the rows after removing them from the Group. I want the row index to be in serial(1,2,3,4,5,....) after ungrouping a row from the group.
I was checking on NatTable Row Grouping Functionality. There is one example called PerformanceRowGroupingExample where there are different functionalities to group and ungroup the rows. What I wanted to know is when I Ungroup a row from a Group I saw the indexing of the rows is not getting changed i.e. they are not seen in a serial order 1,2,3....So I tried few things with rowreorderlayer to make the order proper but it didn't work. So If we have any solution for this will be helpful.
Row Grouping functionality
Indexing after ungrouping a row from a group
I have tried few ways to re index the rows after removing them from the Group. I want the row index to be in serial(1,2,3,4,5,....) after ungrouping a row from the group.
Share Improve this question edited 2 days ago greg-449 111k235 gold badges109 silver badges159 bronze badges asked 2 days ago Sravani JanupalaSravani Janupala 111 bronze badge New contributor Sravani Janupala is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.1 Answer
Reset to default 0If I understand correctly, you want to hide the fact that the row was reordered and keep the sequential row index.
As the RowHeaderLayer
is a DimensionallyDependentLayer
it reflects the position-index transformation of the body. And there the row was reordered. The only way to get your requirement implemented is to override RowHeaderLayer#getDataValueByPosition()
so it does not use the default data provider that is based on the index.
ILayer rowHeaderLayer =
new RowHeaderLayer(rowHeaderDataLayer, viewportLayer, selectionLayer) {
@Override
public Object getDataValueByPosition(int columnPosition, int rowPosition) {
return Integer.valueOf(rowPosition + 1);
}
};