Vadim Lotarev
Vadim Lotarev

Reputation: 119

Vaadin grid details behaviour

Could you please advice whether is it possible to achieve the following behavior with the Vaadin Grid details:

  1. Do not show details row based on grid item content.
  2. Do not collaps previously expanded details on another rows (be able to show details for more than one row).

I am using the latest release version of Vaadin 24.

Thanks in advance, Vadim

Upvotes: 0

Views: 191

Answers (1)

Rolf
Rolf

Reputation: 2418

Yes to both.

You can toggle the visibility of the details panel manually with the setDetailsVisible(T item, boolean visible) method, e.g. triggered from a clicklistener on the row, depending on the item on that row.

The 2nd example in this section https://vaadin.com/docs/latest/components/grid#item-details has an example of using that method, and also demonstrates having multiple details open simultaneously.

Upvotes: 2

Related Questions