PDA

View Full Version : CheckBoxSelectionModel Question



emmas
27 Apr 2010, 12:14 PM
I'm using CheckBoxSelectionModel for my checkbox. How do I check to see if the checkbox is checked?

Code:

ArrayList<ColumnConfig> col = new ArrayList<ColumnConfig>();

col.add(new ColumnConfig("col1", "Col1", 100));
col.add(new ColumnConfig("col2", "Col2", 100));

CheckBoxSelectionModel<ModelData> sm = new CheckBoxSelectionModelOverride<ModelData>;
col.add(sm.getColumn());

ColumnModel columnModel = new ColumnModel(col);
Grid grid = new Grid<BeanModel>(store, columnModel);
grid.setSelectionModel(sm);
grid.addPlugin(sm);

Thanks,

sven
27 Apr 2010, 1:24 PM
The checkbox is checked if the row is selected. So simple check if the model for that row is selected in the selectionmodel