Hi,
In the latest SmartGwt 1.1 (uploaded 3 days ago), multiple selection for a grid does not work anymore. My settings are:
grid.setSelectionType(SelectionStyle.MULTIPLE); and
grid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
I am able to select 1 row only. As soon as I click the second row, the earlier selected row is deselected.
When the grid is grouped, and I click the ‘selectall’ checkbox, multiple rows are selected.
‘Select All’, selects all rows in the ‘expanded’ groups only. Rows in ‘collapsed’ groups are not selected(even in the visible range).
Is this an issue or is this by design?
Thanks, tried that..the javadoc says "the combination of selectionAppearance:“checkbox” and selectionType:“multiple” results in a grid where multiple selection can only be achieved via shift-click or ctrl-click. "
Hi Ganesh,
You should be able to resolve this by setting ‘selectOnEdit’ to false for your grid. When selectOnEdit is true, the grid always selects the row being edited when editing starts, and deselects other rows in the grid
We’ll update the documentation to make this clear
SelectionStyle.MULTIPLE
SelectionAppearance.CHECKBOX
setCanEdit(true)
ListGridEditEvent.CLICK
setSelectOnEdit(false)
and the data is grouped.
With these settings, here are my observations:
As soon as I click the ‘selection’ checkbox of a second row, the previous selections are lost.
If I ctrl-click the checkbox of a second row, the previous selection is retained. (But this is not really user friendly, if I accidentally click any row, all previous selections will be lost)
As soon as I click any group icon(‘+’), all selections are lost and the group is expanded.
If I ctrl-click the group icon(‘+’), the selections are retained. (Again not very user friendly, end users are not going to remember or like this)
My suggestion is that if SelectionType is multiple, then the SmartGWT should never reset the selections.