I have autogeneratecolumns set to true because the gridview can display the contents of many tables depending on user selection in drop down box. I always want the first column to be hidden (it is uniqueid). I've tried this...

VB Code:
  1. Protected Sub gvTranslations_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles gvTranslations.PreRender
  2.     gvTranslations.Columns(0).Visible = False
  3. End Sub

But I get an argumentoutofrange exception. The count property is 0.

How do I do this?

I have a second question: When the user clicks Edit nothing happens. If they click edit again then the fields become editable. Why nothing the first time?

Thanks.