Hi!
Please note that I am a student. I need some help because I’m stuck.
I have completed the tutorial, and I would like to further develop the “7. Creating UI from Scratch” chapter.
How can I develop to toggle all Checkboxes in a Grid Column on/off at once?
First I have made a Checkbox in the header. But what’s the next step? How can I access the Checkboxes in the rows?
Please note that I want to continue the 7th lesson and not to use: DataGrid.setSelectionMode(Grid.SelectionMode.MULTI);
Thank you in advance for your help.
public void onInit(final InitEvent event) {
Checkbox headerCheckbox = uiComponents.create(Checkbox.class);
Grid.Column<UserStep> completedColumn = stepsDataGrid.addComponentColumn(userStep -> {
. . . ;
}).setHeader( headerCheckbox )
.setKey("checkbox0");
. . .
headerCheckbox.addClickListener( e -> {
Grid.Column<UserStep> checkBoxColumn = stepsDataGrid.getColumnByKey("checkbox0");
//TODO: ???
});