|Select a row after including a new one [message #1736303]
||Tue, 28 June 2016 10:30
| Nico Linder
Registered: June 2016
We use NatTable in our project and added and option to a rightclick-menu, which inserts a new row. We wanted this new row to be selected, but this selection is only flickering shortly.
Here is the code for adding the row and selecting it. I removed some code for calculating row indizes for example.
CompoundCommand command = new CompoundCommand();
command.append(new AddCommand(editingDomain, ((HaraGlazedListsDataProvider<HazardAndRiskAssessmentRow>) this.dataProvider).getEList(), row));
natTable.doCommand(new ShowRowInViewportCommand(this.bodyLayerStack.getViewportLayer(), min));
natTable.doCommand(new SelectRowsCommand(this.bodyLayerStack.getSelectionLayer(), 0, rows, false, false, min));
I also added a gif of the flickering row in the attachments.
Has anyone an idea how to make this selection to stay?
Powered by FUDForum
. Page generated in 0.02251 seconds