title: Default Uneditable Values in Datagridview When the User Edits a New Row to Add to a Database
body: <p>I wanted to used a datagridview to let a user edit certain columns in a MYSQL DB. I'm starting of with an empty table. So if:</p>
  
  <pre><code>...
  connection.Open();
  mySqlDataAdapter = new MySqlDataAdapter("SELECT * FROM `expenses` ", connection);
  connection.Close();
  DataSet DS = new DataSet();
  mySqlDataAdapter.Fill(DS);
  dataGridView1.DataSource = DS.Tables[0];
  ...
  </code></pre>
  
  <p>gives me a datagridview with all the correct col names at the top and one empty row with >* at the very left of this empty row and if I begin to edit a cell in this row the very left now turns into a pencil icon and a 2nd new "proto" row appears below with just a * at the very left. This is OK, I think it's standard behavior.</p>
  
  <p>My questions is how to always show and enforce a default value in a few of the columns of these "empty" and "proto" (don't really know the correct term to describe these rows). I don't know how these rows/cells are accessed programmatically. The bottom line is that I'd the user to have/see uneditable values in certain cells as they edit a new row.</p>
  
  <p>Then user edits the cols which I make editable. And, new rows as a result get added to the dataview. Actually adding the rows to the DB table is next but I wanted to know if this can be done first.</p>