I have several panels on a form. I get a datareader from a table that gives me the names of the panels on the form (you'll see why in a second).

The dataset writes its data to a infrogistics datagrid, along with other info such as Item ID.

Now, based on the panel name on the selected row, I want to make visible that panel and hide the rest.

I can get the contents of the cell, within which holds the name of the panel I want to display. However, I need to access the Visible property of a control with the variable contents as its name.

For example, the cell contains "Panel1". I need to do this

Code:
Panel1.Visible = True
To hide the remaining panels I can do a For Each loop.

Unfortunately a Select Case statement won't do because the whole point of the exercise is to not include hard-coded control names.

The panels can be added any time with different data on them, but I need to only put the new panel on the form, and an entry in the database for the Item ID that tell the app which Panel to show.