Grid Multi selection with Shift/Ctrl

Guys, it’s very impressive what you did. Not only grid, whole Vaadin. But as i see that you’re have much different view on usability than standard, and Grid became proof. Why, guys. Why you’re thinking that multiple selection with checkboxes is good? I did not expect such a… I beg u, please see on Ext Gwt usability. Vaadin such a great thing but It lacks seemingly obvious things. Now i need to write a code which would do such obvious things. Don’t get me wrong we’re want to buy spreadsheet, before i had bought pro tools. But I need to constantly reinforce this leadership. Cuz they’re have rly strong argument - is usability, and they are right.

Hi Zhilin,

There is already an add-on that gives you a way to use some of the old table selection modes with Grid, called GridExtensionPack (which sadly depends on Vaadin 7.5.0.beta2 as we’re speaking). Shift selection is still unsupported, since it requires a bit more tinkering, but ctrl + click and table simple multiselect (select/deselect on click) already exists. The selection column can be hidden with some CSS magic. I intend to add this as an option to the extension once I have the time to do it.

If you have other good ideas on how to make Grid behaviour better, you can tell us here on the forums or file tickets to the issue tracker for Vaadin at . If it does not get into the core, I will consider adding it to the extension pack for Grid. All feedback is welcome.

As for the question why is there a selection column, the idea of selection models was that you could implement your own selection model. This however was not done because of time restrictions. We hope we have time in the future to refactor those so that you could implement your own selection model without the selection column, but this is not going to happen too soon…


Hi Teemu,

Just downloaded the GridExtensionPack and can’t seem to get it to go.
I’m using the following code:

TableSelectionExtension ext = TableSelectionExtension.extend(theGrid); ext.setMode(TableSelectionState.TableSelectionMode.CTRL); I’m just getting the normal multi-select with tickbox… I was hoping i’d be able to hide the tickbox and go back to the table style multi select…

am I missing something??


Hi Ben,

I run into some problems while trying to make the Grid selection column disappear completely. In some cases it comes back unexpectedly (due to the way selection model is currently implemented). I’ve been tinkering around with some changes to the Framework to make custom selection models a reality, but until then you can use following theming trick to hide the selection column:

.v-grid-tablewrapper { td:first-child,th:first-child { padding: 0px; border: 0px; > span { display: none; } } } In the future I plan to bring you a real TableSelectionModel with all the stuff supported, but it depends on some changes from the Framework part to support this correctly.


Thanks for the update Teemu…

That code makes sense for hiding the tickbox, but I still cannot get ctrl-select to work.
The grid is still behaving exactly like a SelectionMode.MULTI grid…

Do I need to hide the tickbox for the ctrl to work??

Hi Ben,

That sounds odd. The exact same setup code works in my demo UI. Have you remembered to compile the widgetset? If not, then I’ll need to investigate a bit to see where it goes wrong.


AH - that could be it. I’ll pop it in the widgetset for recompile. I was half wondering if it was a compiled widget or not.

Yep. Recompiled widgetset with the GridExtensionPack included and we’re all good.

Nice little plugin you’ve got here Teemu. Let me know if I can help with features / testing in the future - my app makes extensive use of tables, and will be changing a LOT of them over to Grid.


It’s good to have some feedback. Also, if you have some suggestions on new features to introduce, please do so. I’ll start some thread for the add-on so I can post updates etc.


Shift select would be super handy, although CTRL-select is totally fine for now.

Scrolling of the “collapsable columns” drop down - I have grids that have 30+ columns so that thing frequently scrolls off the screen and you can’t scroll /paginate it like a combo box does. That may or may not be doable with this extension though.

Filter by column with and/or logic builders is an area of huge interest to me. I do it currently with a stand alone panel that creates in-memory filters, but having that in the columns itself would be really nice, and much more doable I think with the help of renderers and custom cell heights.

I need to play with the demo to see what else you’ve put in… feel free to let me know how I can help out. I really appreciate good extensions - saves me a LOT of work.

Hover action menus per row would also be really nice, in a similar way to the little cog pops up on table collapsable.

Hello guys. I really appreciate vaadin and its impressive too. But currently I am facing an issue with grid and table shift select option in touch screen laptop. May I know if this is implemented in the newer version? or any solutions available for the touch screen laptops?. I went through some of your forums and heard about Grid extension pack. Seems like it doesnt work for touch screen!!!. I’l be happy if anybody can help.