문제

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!

도움이 되었습니까?

해결책

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

       grid.addPlugin(sm);

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top