How to add Vaadin TreeGrid or other standarda Vaadin Component to a View?

Hi,
is it possibile to add Vaadin TreeGrid to a View ?
Using Jmix UI ?
I can add it from code on View Controller

‘’’
import com.vaadin.flow.component.treegrid.TreeGrid;
import com.vaadin.flow.component.button.Button;

    public void buildDemo() {
    final Button btn = new Button("Save");
    btn.addThemeVariants(ButtonVariant.LUMO_ERROR);
    final TreeGrid treeGrid = new TreeGrid<GeoTreeNodeEntity>();
    mainFlexLayout.add(btn);
    mainFlexLayout.add(treeGrid);
   }

‘’’

Is there a way to add any Vaadin standard compoent to a View
using Jmix UI?
Might it be useful to have all the standard Vaadin components in the Jmix UI ?

Hi, Stefano!

There is TreeDataGreed component in Jmix.

Does it solve your problem?

Thanks.

I solved "partially using TreeDataGreed " and post a solution here
#How to select row on click on row in tree datagrid - #3 by scarfagna72

but i dont like it because I’ve to create a
TreeDataGreed need to create a JmixEntiy but id dont need to save it .

The best solution is to use a native Vaadin tree and Pojo or Dto.
I can do it from ViewController and code as I shown (look at the link) .

But could be nice to have a Jmix UI tool showing native Vaadin component to add to the View.

Hi, Stefano!

You can use Jmix DTO with TreeDataGrid

Is there any reasons not to use it?

Thanks, Pavel.