I need to write a simple datagrid form which allows users to edit cells - The problem is that different people can edit this at EXACTLY the same time so concurrency becoames an issue
I am using data backed by a database
I seem to have two options here:
1) Continually poll the database and refresh data in the datagrid before allowing editing - This means that updates to the database need to take place just after editing rather then the preffered way of allowing edits, then letting users review and then commiting.
2) Allow dirty edits and then prevent users from commiting to the database the changes they want
Can anyone describe a mechansim which allows users to edit rows concurrently which would make the implementation easy??
EDIT : My question is how to implement this in C# - I have added lock columns but this is still not sufficent - If usera tries to edit row1 and commits changes userB tries to edit a stale version of row1 this will not get caught which is a BIG problem