Hi,
My problem is that changed content of a cell is not saved, due to wrong rowstate.
If you take a look at http://screencast.com/t/t6QOoCP9UaBV you'll see that I change the content of a cell in a row. When you see the breakpoint in code that is following, you'll see that the value of the cell actually holds the proper value that I selected from FileDialog. But the RowState says "Unchanged", where I would expect a "Modified".
I can work around this by moving a row forward - but that's just ugly.
When I hit the Save-button, this code is executed:
QAData.DataList dl = new QAData.DataList();
dl.SaveTegning((DataTable)gridTegning.DataSource);
The SaveTegning() method contains:
public void SaveTegning(DataTable Tegning)
{
foreach (DataRow row in Tegning.Rows)
{
if (row.RowState == DataRowState.Added || row.RowState == DataRowState.Modified)
I did try with both EndEdit and AcceptChanges, but neither had the desired effect.
Any idea how I can obtain the proper RowState without moving row in the grid before saving (as in: what would I do with just one row)?
Best regards
Morten Snedker