I am now evaluating the Infragistic ASP.NET controls.
I found that i cannot achieve optimistic concurrency control with Infragistic WebDataGrid and Entity Data Source.
I load a web page with WebDatagrid and EntityDataDource to show a table from sql server 2008. I have configured the EntityData and set Concurrency Mode to Fixed. After that I change the data in database directly by using sql. Next I go back to the web page (I don't reload that) to modify some data. Clearly this will lead to concurrency problem and I expect the system to block me from (at least throw an exception) updating the record. However, the update is applied to the database and this is not what I expected.
I used sql server profiler to review the process behind. I found that the sql generated by the web site already include a where clause to check if the value is modified by others before applying the update. e.g.
update ATable set SomeField =1 where PrimaryKeyField = old value and Y = old value
However, the value applied to the where clause is not old values but the latest value from database. I and found that WebDataGrid loads value from database again each time when postback occur. I suspect the missing of old values is the root cause of the problem
When I use the native ASP.NET datagrid, the problem does not occurs.
Can anyone help me?
Hi rayc1234,
I noticed you have a similar post - http://community.infragistics.com/forums/p/70005/355428.aspx. Use that thread for further questions, regarding this matter.
Feel free to contact me if you have any other questions.