title: DataGridView Printing
body: <p>How do I print specified rows  out to a file from a DataGridView?
  Also how can I print out certain columns?</p>
  
  <h2>This is what I have been trying to work with.. but it is not working..:</h2>
  
  <pre><code>    private void saveButton_Click(object sender, EventArgs e)
      {
              saveFile1.DefaultExt = "*.txt";
              saveFile1.Filter = ".txt Files|*.txt|All Files (*.*)|*.*";
              saveFile1.RestoreDirectory = true;
  
              if (saveFile1.ShowDialog() == DialogResult.OK)
              {
                  StreamWriter sw = new StreamWriter(saveFile1.FileName);
  
                  List&lt;string&gt; theList = new List&lt;string&gt;();
  
                  foreach (var line in theFinalDGV.Rows)
                  {
                      if (line.ToString().Contains("FUJI"))
                          richTextBox1.AppendText(line + "\n");
                  }
              }
      }
  </code></pre>
  
  <p>Can anyone help me in the right direction?</p>