DataGrid - Preventing Concurrent Access To Rows
<p>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</p>

<p>I am using data backed by a database</p>

<p>I seem to have two options here:</p>

<p>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.</p>

<p>2) Allow dirty edits and then prevent users from commiting to the database the changes they want</p>

<p>Can anyone describe a mechansim which allows users to edit rows concurrently which would make the implementation easy??</p>

<p>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</p>
