title: Inherits from DataGridView with custom properties
body: <p>I've written my own grid that inherits from DataGridView Class and has a custom properties and columns.</p>
  
  <p>Like this : </p>
  
  <pre><code>public class foo : DataGridView {
  
      private System.Windows.Forms.DataGridViewTextBoxColumn C1;
  
      public foo() {
          InitializeClass();
      }
  
      void InitializeClass() {
  
        this.AutoGenerateColumns = false;
        C1 = new DataGridViewTextBoxColumn();
        this.C1.DataPropertyName = "C1";
        this.C1.HeaderText = "Column 1";
        this.C1.Name = "C1";
     }
  
  
  }
  </code></pre>
  
  <p>The program runs well, but Visual Studio is creating a mess with the code!
  In InitializeComponent() Vistual Studio creates again the DataGridViewColumns with its properties :S</p>
  
  <p>Is there any way to avoid this behavior.</p>
  
  <p>Thnks!</p>
  
  <p><strong>UPDATE : AutoGenerateColumns is set to false</strong></p>