2
votes

Working with GXT and using a checkbox selection model. I notice that when every row is checked, the checkbox header will also be checked, but the checkbox header has no functionality of its own.

How can I tell the checkbox header to select/unselect all checker rows when clicked?

Thanks for the help!

2

2 Answers

3
votes

You need to add the selection model as a plugin to the grid.

       grid.addPlugin(sm);
0
votes

You will need to set the selection model on the grid directly.

identityProvider = new IdentityValueProvider<DataModelProxy>();

checkboxSelectionModel = new CheckBoxSelectionModel<DataModelProxy>(identityProvider);
checkboxSelectionModel.setSelectionMode(SelectionMode.MULTI);

grid.setSelectionModel(checkboxSelectionModel);

where DataModel is your datamodel and proxy of this model.