How can I add a checkbox to Grid on right hand side


I am using Vaadin 8.0.6. I need to add a checkbox to right of a grid and customize it so that based on some state I need to show either a text or a checkbox. Can someone show me a code on how to do it.