简体   繁体   English

可设置的多行选择

[英]nattable multiple row selection

I am using NatTable and I want to select some rows in my table. 我正在使用NatTable,我想在表中选择一些行。 Additional I want to select some other rows after this (CTRL + left mouse-click). 另外,我想在此之后选择其他一些行(CTRL +鼠标左键单击)。

There is no problem with the first selection, but when I try to select some additional rows, my first selection got lost. 第一次选择没有问题,但是当我尝试选择其他行时,我的第一次选择丢失了。 This happens only if I do my second selection in dragmode. 仅当我在拖动模式下进行第二次选择时,才会发生这种情况。 When I select every additional row by single clicking everything works fine. 当我通过单击选择所有其他行时,一切正常。

I used the RowSelectionModel with the DefaultRowSelectionLayerConfiguration: 我将RowSelectionModel与DefaultRowSelectionLayerConfiguration一起使用:

    selectionLayer.setSelectionModel(new RowSelectionModel<Entry>(selectionLayer, bodyDataProvider, new IRowIdAccessor<Entry>() {

        @Override
        public Serializable getRowId(Entry rowObject) {
            return rowObject.getStartLine();

        }
    }));
    selectionLayer.addConfiguration(new DefaultRowSelectionLayerConfiguration());

Maybe I just did a silly mistake and you guys can help me. 也许我只是犯了一个愚蠢的错误,你们可以帮助我。

It looks like an issue in the NatTable code. 看起来在NatTable代码中是个问题。 I created a ticket for this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=494392 我为此创建了一个票证: https : //bugs.eclipse.org/bugs/show_bug.cgi?id=494392

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM