I have two datagrids in my form. The second datagrid data displayed depends on the row selection made in the first datagrid. Using the id displayed in the first datagrid I retrieve the data for the second datagrid. So it is important that I have the id in the first datagrid. But I want to hide this.
I tried using this code
dgRegion.Columns(0).visible = False
but I get a message
"columns is not a member of system.windows.forms.datagrid".

I am not able to create an object of type datagrid either.

I read somewhere that to use the columns.visible property I have to create the datagrid through the code. Is this true?
Will I not be able to hide the column for a datagrid generated in the designer?

Thanks.