How to stop DataGridView from polluting my Designer file with column controlls?

Posted by BeowulfOF on Stack Overflow See other posts from Stack Overflow or by BeowulfOF
Published on 2010-04-23T13:11:36Z Indexed on 2010/04/23 13:13 UTC
Read the original article Hit count: 207

Filed under:
|
|

I'm sure you know the problem, as soon as a BindingSource is connected to a DataGridView the DataGridView generates columns for each Property found in the Type of the BindingSource's DataSource and adds that crap to the Form.Designer.cs file.

We only use run time generated columns, the clutter in the designer file is just waste of code, so how can we stop this "feature" of the DataGridView in WinForms?

© Stack Overflow or respective owner

Related posts about winforms

Related posts about c#