how to add a component into DataGrid from code

I have a tab (OrderedContainer) and on each a DataGrid, using sudio I can add a new component such a buttonPannel and inside a Button to export the content of datagrid in excel.

I want do this from the code, is this possible ?

Regards,
Gent

I found the solution, I wont delete this in case someone would need to know :

By checking the DataGrid class, I remarked that it implements HasButtonsPanel, which makes things easy :slight_smile:

So just by doing

datagrid.getButtonsPanel().add(new WebCheckBox());