Multiple selection in a grid

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 for looking for it.

With Best Regards
Ganesh

Unfortunately this one slipped through the cracks for 1.1. Please use the latest build from here. We’ll put up a 1.1.1 release later this week.

Edit : Actually you need to use SelectionStyle.SIMPLE. The javadocs clarify this.

Hi,
Thanks for the quick response. I downloaded build 559 and tried the same. I still have the same issue.

Thanks & With Best Regards
Ganesh

See my updated comment above.

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. "

I tried with
1)
grid.setSelectionType(SelectionStyle.MULTIPLE);
grid.setSelectionAppearance(SelectionAppearance.CHECKBOX);

and

  1.              grid.setSelectionType(SelectionStyle.SIMPLE);
             grid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
    

In both cases, I am not able to select multiple rows. Even with shift-click, ctrl-click, I am not able to select multiple rows.

Thanks & WIth Best Regards
Ganesh

Additional settings:

grid.setCanEdit(true);
grid.setEditEvent(ListGridEditEvent.CLICK);
grid.setAutoSaveEdits(false);

Thanks & With Best Regards
Ganesh

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

Let us know if this doesn’t resolve it for you

Thanks
Isomorphic Software

Thanks for this suggestion.

My settings are:

SelectionStyle.MULTIPLE
SelectionAppearance.CHECKBOX
setCanEdit(true)
ListGridEditEvent.CLICK
setSelectOnEdit(false)

and the data is grouped.

With these settings, here are my observations:

  1. As soon as I click the ‘selection’ checkbox of a second row, the previous selections are lost.

  2. 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)

  3. As soon as I click any group icon(‘+’), all selections are lost and the group is expanded.

  4. 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.

Thanks
Ganesh

Set selectionType to SIMPLE as the docs recommend, that seems to do what you want.