Vaadin Grid ButtonRenderer listener to change component state in other clas

I have two classes for different layout ( layoutA and layoutB ).
In layoutA, I have grid component with buttonrenderer inside grid.
In layoutB, I have form layout that’s include TextField, DateField, TextArea and also FieldGroup.
How to build the event listener, whenever I click button inside grid (layoutA) to change FieldGroup ( layoutB ) datasource ?