The error is pretty explicit:
Columncount property cannot be set on a data-bound datagridview control
Ant what it means is: if your DGV has a DataSource, you cannot control the number of columns because the source requires a specific number.
So if you want to do "special things" with a databound DGV, you need to remove any existing binding first, by setting the DataSource property to Nothing.
DataGridView1.DataSource = Nothing
DataGridView1.AutoGenerateColumns = False
DataGridView1.ColumnCount = 12
...
DataGridView1.Columns(11).DataPropertyName = "Photo"
DataGridView1.DataSource = ds.Tables(0)