In one of my current projects I used Datagrid’s with RowDetail forms for editing the ItemSource collection.  This created  a unique issue with exception throwing from the entities so the form will provide immediate response to the user.  This became very difficult to accomplish with the fact that the entities were provided by WCF (the Domain Service – we are not using RIA).   Now the issue is that the WCF ONLY provides the implementation of the entity and not the entity itself, so in short terms no exception is thrown to the UI; however we would receive the general service fault exception from the service.

To overcome this I used the shared entity model and included them in both the Silverlight frontend and WCF backend.  Now this is great solution; however if the user does not enter the form field well no instant feedback.

So for this opportunity, I created a .Validate method on the object and had it produce an error collection as well as return a true/false.

This option now allowed me to validate the object in ItemSource collection, so now the application can bulk save and evaluate the collection of data rather than one field at a time.

I will post an example of this process in the near future as well as how to do it.

Leave a Reply