Directory

← Back

ItemGrid

Item Grid displays items of a container in a grid. Each cell can be rendered individually with a dedicated component.

Author

Rating

Popularity

<100

Vaadin 14 version of this is a part of SuperFields

Item Grid is a data component (AbstractSelect). The items of the container data source are displayed in a grid.

The following properties of Item Grid can be modified:

  • number of columns (setColumns / getColumns)
  • whether or not items can be selected (setSelectable / isSelectable)
  • currently selected item id (getValue / setValue)
  • multi-selection (isMultiSelect / setMultiSelect) - from version 0.3.0
  • no selection allowance (isNullSelectionAllowed / setNullSelectionAllowed) - from version 0.3.0
  • item component generator (getItemComponentGenerator / setItemComponentGenerator), an interface with one method: getComponentForItem(Object itemId, Item item, boolean selected) which returns a com.vaadin.ui.Component

The following is on a todo list:

  • allow customisation of built-in style names
  • reordering items with drag and drop

The source code is included in the jar file and can be found in the issue tracker.

Sample code

ItemGrid grid = new ItemGrid();

grid.setContainerDataSource(myContainer);

// selectable is true by default
grid.setSelectable(false);

// three columns by default
grid.setColumns(5);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Contribution by Jennie Lyn Shapiro (thanks!) - ItemGrid should now work with Vaadin 7.6

Released
2016-01-18
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.6+
Vaadin 7.1+ in 0.3.0
Browser
Firefox
Opera
Safari
Google Chrome
Internet Explorer
Internet Explorer
Internet Explorer

ItemGrid - Vaadin Add-on Directory

Item Grid displays items of a container in a grid. Each cell can be rendered individually with a dedicated component. ItemGrid - Vaadin Add-on Directory
## Vaadin 14 version of this is [a part of SuperFields](https://vaadin.com/directory/component/superfields) Item Grid is a data component (AbstractSelect). The items of the container data source are displayed in a grid. The following properties of Item Grid can be modified: * number of columns (setColumns / getColumns) * whether or not items can be selected (setSelectable / isSelectable) * currently selected item id (getValue / setValue) * multi-selection (isMultiSelect / setMultiSelect) - from version 0.3.0 * no selection allowance (isNullSelectionAllowed / setNullSelectionAllowed) - from version 0.3.0 * item component generator (getItemComponentGenerator / setItemComponentGenerator), an interface with one method: getComponentForItem(Object itemId, Item item, boolean selected) which returns a com.vaadin.ui.Component The following is on a todo list: * allow customisation of built-in style names * reordering items with drag and drop The source code is included in the jar file and can be found in the issue tracker.
Online