nattable.setConfigRegistry(configRegistry);
nattable.addConfiguration(new DefaultNatTableStyleConfiguration());
nattable.addConfiguration(new SingleClickSortConfiguration());
SelectionLayer selectionLayer = glazedListsGridLayer
.getBodyLayerStack().getSelectionLayer();
ListDataProvider<RowDataFixture> bodyDataProvider = glazedListsGridLayer
.getBodyDataProvider();
// Select complete rows
RowOnlySelectionConfiguration<RowDataFixture> selectionConfig = new RowOnlySelectionConfiguration<RowDataFixture>();
selectionLayer.addConfiguration(selectionConfig);
nattable.addConfiguration(new RowOnlySelectionBindings());
// Preserve selection on updates and sort
selectionLayer.setSelectionModel(new RowSelectionModel<RowDataFixture>(
selectionLayer, bodyDataProvider,
new IRowIdAccessor<RowDataFixture>() {
public Serializable getRowId(RowDataFixture rowObject) {
return rowObject.getSecurity_id();