I currently have a DataGridView that is bound to a DataSet reading from an XML file.
Populating the DataGridView just fine; the last column is a button I want the user to click to commit changes to the row.
I'm able to find which rows are dirty easily, however, I'm having trouble finding which cells within a dirty row are themselves dirty.
I iterated through each cell within a dirty row, but they're not showing as being dirty.
Any thoughts appreciated!
if ( this.inventoryGridView.Columns[e.ColumnIndex].Name == "itemCheckedIn" )
{
// Give the user a visual indicator the cells are "locked"/readonly by changing the background color
this.inventoryGridView.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.LightGray;
// Check if any changes have been made to the row that was checked in
if ( this.inventoryGridView.IsCurrentRowDirty )
{
foreach ( DataGridViewCell dirtyBoy in this.inventoryGridView.CurrentRow.Cells )
{
// Is he dirty?
}
}
// No changes were made to the row that was check in; let's log the check in
else
{
// Log the check in time
}