title: datasource as readonly - C#
body: <p>I have a DataGridView with properties <code>DataSource = datatable()</code> and <code>readonly = false</code>. <code>readonly</code> must be false since there are other columns that can be editable. How do I make all the columns in DataSource read only (not editable)? </p>
  
  <p>The code is as follows:</p>
  
  <pre><code>type = new DataGridViewComboBoxColumn();
          table= new DataGridView
                           {
                               DataSource = datatable(), // this returns a DataTable object
                               AllowUserToAddRows = false,
                               AllowUserToDeleteRows = false,
                               RowHeadersVisible = false,
                               MultiSelect = false,
                               Name = "AgentTable",
                               AutoSize = true,
                               ReadOnly = false,
                           };
          table.Columns.Add(CreateStartButton());        
          type.Items.Add(" some table");
          type.ReadOnly = false;
          table.Columns.Add(type);
  </code></pre>
  
  <p>EDIT:
   the datagridview will contain 4 columns.</p>
  
  <ul>
  <li>First column, each cell is a button (readonly doesnt matter)</li>
  <li>second column, each cell is a drop down box (readonly is false)</li>
  <li>third and fourth columns are created as DataTable object so (readonly must be true)</li>
  </ul>
  
  <p>so my question is how to make the third and forth column read-only?</p>