Question

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!

Was it helpful?

Solution

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

       grid.addPlugin(sm);

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top