The closest I have come to finding the solution I need is through the Microsoft Website itself (not all that helpful really) and from this question: How to dynamically assign Datagridview cell values based on data from my database?
So I have this DataGridView object which has a bound DataTable. I have bound the data table like this
GridMemory.DataSource = dtMemory;
I want to perform operations with the DataTable rows. I'm not using this to link to a database, instead, I am using this as a cache of data that both the user and the computer can manipulate to represent the von neumann architecture of a micro-processor. So I have created an array of MemoryRow objects and given each a pointer to a corresponding DataRow from the DataTable. I then try to dynamically alter the data from within the MemoryRow object like this:
public void UpdateGUI() {
dataRow.SetField(1, data);
dataRow.SetField(2, opcode);
dataRow.SetField(3, value);
dataRow.AcceptChanges(); // the commands above are not working, maybe this will help?
dataRow.SetModified(); // that also didn't work, maybe it needs to set a flag then have an event fire?
}
What am I doing wrong or missing?