|
|
|
|
|
|
|
|
|
|
Re: Row selection Slow down in case of large data in NatTable [message #1417446 is a reply to message #1417444] |
Fri, 05 September 2014 13:03 |
Chetana Barhate Messages: 18 Registered: February 2014 |
Junior Member |
|
|
Ok...
For that we have written the bolw code:
protected void addMouseRightClickBinding() {
tableComponent.getUiBindingRegistry().registerMouseDownBinding(
new MouseEventMatcher(GridRegion.BODY,
MouseEventMatcher.RIGHT_BUTTON), new IMouseAction() {
@Override
public void run(NatTable natTable, MouseEvent event) {
SelectRowGroupsAction selectrowgroup = new SelectRowGroupsAction();
ViewportSelectRowAction selectRowAction = new ViewportSelectRowAction(
false, false);
int rowPosition = LayerUtil.convertRowPosition(
natTable, natTable.getRowPositionByY(event.y),
selectionLayer);
if (!selectionLayer.isRowPositionSelected(rowPosition)) {
selectRowAction.run(natTable, event);
} else {
int sele = selectionLayer.getSelectedRowCount();
if (sele <= 1) {
selectRowAction.run(natTable, event);
} else if (sele > 1) {
selectrowgroup.run(natTable, event);
}
}
}
});
}
-----------------------------
It Solves our problem but not sure that its correct way or not. Please confirm.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04160 seconds