title: How to hide column of DataGridView when using custom DataSource?
body: <p>I have a small app in c#, it has a DataGridView that gets filled using:</p>
  
  <p><code>grid.DataSource = MyDatasource array;</code></p>
  
  <p>MyClass hold the structure for the columns, it looks something like this:</p>
  
  <pre><code>class MyDatasource
  {
      private string column1;        
      private string column2;
  
      public MyDatasource(string arg1, string arg2)
      {
          this.column1 = arg1;
          this.column2 = arg2;
      }
  
      public string column1
      {
          get
          {
              return this.column1;
          }
          set
          {
              this.column1 = value;
          }
      }
  
      public string column2
      {
          get
          {
              return this.column2;
          }
          set
          {
              this.column1 = value;
          }
      }
  }
  </code></pre>
  
  <p>Everything works fine and the DataGridView gets populated with the correct data, but now I want to hide the column2. I tried adding <code>[Browsable(false)]</code> above the column declaration, that will hide it, but I also need to access the column value from code, and when I use <code>[Browsable(false)]</code> and try to read the content it acts like if the column doesn't exist. If I don't use it I can read the column without problem but it's visible in the DataGridView.</p>
  
  <p>How could I hide the column but still be able to read its content from code?</p>