I've got a CellTable, which has 4 columns:
| Column 1 | Column 2 | Column 3 | Column 4 |
Goal:
User can select multiple columns while holding mouse button down and hovering over the columns.
e.g User clicks on column 1 and holds the mouse button down, moves over column 2 and 3 resulting in column 2 and 3 being selected.
I tried:
final MultiSelectionModel<data> selectionModel = new MultiSelectionModel<BestellungData>();
cellTable.setSelectionModel(selectionModel);
cellTable.addCellPreviewHandler(new Handler<data>()
{
@Override
public void onCellPreview(
CellPreviewEvent<data> event) {
// TODO Auto-generated method stub
if ("click".equals(event.getNativeEvent().getType())) {
selectionModel.setSelected(event.getValue(), true);
}
}
});
However it doesn't work.
MultiSelectionModel
is used to select multiple rows, not multiple columns. – Kinase