Details in grid

Hi, there is a way to create a grid with the details of a row in the open state. For example I don’t have to do:
grid.addItemClickListener (event → grid.setDetailsVisibleOnClick (true));
but I would like to find it already open.

I only see a way to set the details visible per item by calling setDetailsVisible on the grid. But there seems to be no way to do that for the whole grid with one method call.

As an alternative you could create component columns or use a LitRenderer

How is setDetailsVisible(item, true) not of use here @adaptable-uakari ?

Based on the question I was assuming that the OP wanted to have all rows with visible details

Then you’ll just need to call it once for each item.

Sure, but does it make sense to use details in that case?

If yes then there should be a method on the grid to expand the details by default

Maybe? Depends on the use case. But I wouldn’t say “there seems to be no way to do that”.

I’ve updated my answer to: “there seems to be no way to do that for the whole grid with one method call.”

I would argue the grid isn’t designed for this kind of things. Shouldn’t Virtual List be used if some doesn’t want to show tabular data but a lot of information in similar fashion?

Depends on the use case, again. You can’t have aligned columns in a VirtualList, at least without a lot of effort.

Sadly true :sweat_smile:

I have only one row in the grid!

the you can call setDetailsVisible

Thank you!