I’m using a datagrid (actually Infragistics XamGrid) which is bound to a custom list of business objects. In the old WPF days, when completing the edit of a grid row, the business object’s EndEdit() method would be called via databinding.
The EndEdit() method would then save the data to the db via a web service call. The retuning result of the web service call would tell the business object (in the EndEdit() method) of the call succeeded or failed. If it failed, it would roll back
the changes and raise an event to alert the UI.
In the world of Silverlight and Event-Based Async calls, it’s not possible to do all of this from in the EndEdit() method.
Also, I’m generating my web services using the SLsvcUtil.exe tool. Since MS is forcing us to use Async calls, then what is the standard way to update data from a gird row and then roll it back and alert the UI when the call fails?
I found a nice article
http://blog.jayway.com/2010/06/10/silverlight-prefer-synchronous-web-service-calls/ about making synchronous web service calls in SL, but the catch is that can’t be on the UI thread which – updating a gird row will be on.
Please relay any advice and resources you can offer!
View Complete Post