Perhaps the question is not yet clear, I will try to rephrase it :
We are trying to create a DataGrid with editable cells, in which one of them is CheckBoxCell.we are using selection model as
SingleSelectionModel .
Now this CheckboxCell takes two arguments in its constructor, i.e.
/**
* Construct a new {@link CheckboxCell} that optionally controls selection.
*
* @param dependsOnSelection true if the cell depends on the selection state
* @param handlesSelection true if the cell modifies the selection state
*/ public CheckboxCell(boolean dependsOnSelection, boolean handlesSelection) {
}
Now after adding this CheckboxCell to one of the columns of the
grid, it gets rendered with no problems.
But the following issues are noticed :
1) Here while adding the CheckboxCell we with no parameters with in the CheckboxCell constructor we get
SelectionChangeEvent gets fired correctly, but in order to check/uncheck the checkbox we have to click twice on the check box cell.
2) And while using
Column<T, Boolean> checkCellGridColumn = new Column<T, Boolean>( new CheckBoxCell( false, true ){
SelectionChangeEvent is not fired.
What should be done so that I can get the check box checked at just one click and the selection event should also be fired on that click on the check box cell.Thanks.