title: Datagridview get values from all rows
body: <p>My code only gets the values of one row. But my user writes text into many rows and I have to get all their values to write them into a JSON. How can I get the values from all rows?</p>
  
  <pre><code>var llist = new List&lt;MyClass&gt;();
  var obj = new MyClass()
  {
      Nachricht = dataGridView1.CurrentRow.Cells["Value"].Value.ToString(),
      Datum = dataGridView1.CurrentRow.Cells["File"].Value.ToString()
  };
  llist.Add(obj);
  string export = JsonConvert.SerializeObject(new { types = llist }, Formatting.Indented);
  File.WriteAllText(@Settings.Default.folder + "\\" + "upload" + "\\" + "export.json", export);
  </code></pre>