How can I set initial values when using Silverlight DataForm and .Net RIA Services DomainDataSource?

Posted by TheDuke on Stack Overflow See other posts from Stack Overflow or by TheDuke
Published on 2009-09-16T09:58:53Z Indexed on 2010/04/26 2:13 UTC
Read the original article Hit count: 868

I'm experimenting with .Net RIA and Silverlight, I have a few of related entities; Client, Project and Job, a Client has many Projects, and a Project has many Jobs.

In the Silverlight app, I'm uisng a DomainDataSource, and DataForm controls to perform the CRUD operations. When a Client is selected a list of projects appears, at which point the user can add a new project for that client. I'd like to be able to fill in the value for client automatically, but there doesn't seem to be any way to do that, while there is an AddingNewItem event on the DataForm control, it seems to fire before the DataForm has an instance of the new object and I'm not sure trawling through the ChangeSet from the DomainDataSource SubmittingChanges event is the best way to do this.

I would of thought this would of been an obvious feature... anyone know the best way to achieve this functionality?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about silverlight-3.0