Grid image binding data


I am binding data to a Grid on instantiation:

Grid grid = new Grid(container); where my container already holds all the data. One of the properties in my container is the user ID, and I want to display an image in the Grid based on this user ID. So, for example, if the user ID is xxx, the picture file would be xxx.jpg
My problem is that I can’t find a way to get the Grid to do this automatically. All the examples I have found are something like this:

ThemeResource pic = new ThemeResource("images/xxx.jpg");
Grid.Column picColumn = grid.addColumn("Picture", Resource.class);
picColumn.setRenderer(new ImageRenderer());

So they create the ThemeResource, and then explicitly add the row with it.
Is there any way I can do this dinamically, when the data (“xxx” in my example, with no path nor file extension) is already bound to the Grid?

Many thanks in advance.