DataGrid multiple selection

Hi everyone,
I’m using Cuba Platform 7.2.11 (but also tried with 7.2.19)

I’m having trouble with enabling multiple selection in a datagrid I’m using. This is the scenario: I have a TokenList that opens an entity lookup screen with a datagrid and a filter in it. I want to enable the “MULTI_CHECK” selection mode in the datagrid, but setting the field has no effect whatsoever. I had a similar issue in an other lookup screen, but there I fixed it by having the controller call datagrid.setSelectionMode(SelectionMode.MULTI_CHECK) at every change in the underlying data container. This is not possible with the screen I’m currently implementing, because the data container is loaded with a fixed query and is not populated by, say, pressing on a custom search button. I halso tried without using the filter and it had the same problem.

Any pointers on how could I fix this behaviour?
Thanks

EDIT:
I somehow fixed it by subscribing to the BeforeShow event in the screen controller and calling the aforementioned datagrid.setSelectionMode(SelectionMode.MULTI_CHECK). The loading process appears to inhibit the selection mode in the datagrid, is this a bug?

Hello!

TokenList has the multiselect attribute that sets multi selection to the Table / DataGrid (not MULTI_CHECK).

It is not a bug, TokenList configures multi selection after InitEvent. So the right place to override it are BeforeShow and AfterShow events.

Thank you! I knew I was missing something, it makes perfect sense now.