Order issue when adding new row to Grid/GridPro

Hi,

I am using Grid and GridPro in V14. I created a dataprovider for Grid/GridPro based upon a Set, and created button to allow user to add new rows into grid. However, the question is that, when clicking the button to add a new row, the added row seems to be randomly inserted into the grid, not sequentially append to bottom. I am wondering how I can enforce the grid to add new rows to the bottom in sequence.

Best regards,
Joey

A Set is an unordered collection. Have you tried using a List instead?

I am using Java Persistence in this project, and List-typed field would cause problems when retrieving data at certain conditions. Any idea that I can enforce order with Set type?

Best regards,
Joey

Looking at Java API, there’s the SortedSet interface which has Set as superinterface: https://docs.oracle.com/javase/7/docs/api/java/util/SortedSet.html with two implementing classes, https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentSkipListSet.html and https://docs.oracle.com/javase/7/docs/api/java/util/TreeSet.html . Maybe one of those?

Thanks a lot.