title: modify (encrypt/decrypt) cell values in rows of datagridview
body: <p>I've followed this article to use a datagridview to manage data that will be saved into an XML file: <a href="http://www.codeproject.com/Articles/32542/Using-XML-as-datagridview-Source" rel="nofollow">http://www.codeproject.com/Articles/32542/Using-XML-as-datagridview-Source</a></p>
  
  <p>The data will be a list of usernames and passwords. </p>
  
  <p>As such, I need to step through each cell in the columns for 'username' and 'password', and replace the value of the cell with the result of a call to a function that would encrypt or decrypt the value of the cell.</p>
  
  <p>On form_load, after I populate the table with data from the XML file, I want to cycle through these cells and do this to decrypt, and on form close / save, I want to cycle through each cell and encrypt the values before written to file.</p>
  
  <p>I have a function written out to encrypt the data, the part I'm stuck on is how I could step through every cell in the 'username' and 'password' columns of DataGridView1 (as an example) and update the results to the value returned by a function.</p>
  
  <p>I apologize for not having a code example for this question, I do not know how to do this, so I haven't been able to put together a bit of code to try / fail at it.</p>
  
  <p>I imagine it will be something simple like 'For each cell in (whatever statement returns the cells in a given column of the datagridview), ...' , but I'm not sure. </p>