title: Accessing a particular row/column in a dataGrid in WPF
body: <p>Recently I have just started to learn WPF. Although most of my experience with development has come from Win Forms, I have managed to transition to WPF fairly smoothly. </p>
  
  <pre><code>                                OVERVIEW
  </code></pre>
  
  <p>I am writing a program that compares information in two separate dataTables and reflects the changes made in a dataGrid.</p>
  
  <p>The dataTables represent a list of "old Information" and "New Information". After the dataTables are compared I wish to highlight particular cells based on whether a change has been made in the "new information table".</p>
  
  <p>An example would be if the first cell in a dataGrid ([0][0]) contained '3' from the "Old Information" dataTable and if the same cell ([0][0]) in the "New Information" dataTable contained '5'. I would wish to change the background color to say, yellow, to reflect this change.</p>
  
  <pre><code>                                 PROBLEM
  </code></pre>
  
  <p>I am currently working with two dataGrid objects, which are being filled, and representing both dataTables ("Old Information" and "New Information"). The problem I'm having is that I can't seem to access a particular row or column nicely. I would like to be able to access a particular row/ cell so I could change the background color via code.</p>
  
  <pre><code>                                 Comments
  </code></pre>
  
  <p>I remember when I worked with Win Forms you could do something along the lines of dataGrid1.Rows[rowNumber].Columns[ColumnNumber] to access a particular row/column.</p>
  
  <p>From what I have read so far about WPF dataGrids they are more object based or something like that, making the process of accessing a particular row/column a little different/tedious. If you happen to know how one would go about accessing the row/ cell content in a dataGrid in WPF please let me know. Any simple examples would be greatly appreciated.</p>