I have a DGV on a form that is bound to a BindingSource, bound to a business
object. The DGV has AutoGenerateColumns = False and I have created the
columns I want in the designer.

When I make any change to the code behind, even something innocuous like a
new line, and then switch back to the designer, it automatically generates
the columns in my binding source and adds them to the ones I created
manually.

Also, I don't see AutoGenerateColumns anywhere in the DGV's property sheet.
Am I missing something?

I'm using the latest SP. Any ideas?

RE: Strange problem with DataGridView AutoGenerateColumns by ManishBafna

ManishBafna
Thu Apr 26 06:36:03 CDT 2007

Hi,
This link solves your problem:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=650217&SiteID=1
--
If my answer helped you,then please do press Yes below.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



"Barry Gilbert" wrote:

> I have a DGV on a form that is bound to a BindingSource, bound to a business
> object. The DGV has AutoGenerateColumns = False and I have created the
> columns I want in the designer.
>
> When I make any change to the code behind, even something innocuous like a
> new line, and then switch back to the designer, it automatically generates
> the columns in my binding source and adds them to the ones I created
> manually.
>
> Also, I don't see AutoGenerateColumns anywhere in the DGV's property sheet.
> Am I missing something?
>
> I'm using the latest SP. Any ideas?