I'm currently working on a simple online-store-like app that includes several pictures of the items for sale.  We're using the new Dynamic Data extensions and LINQ-to-SQL to handle most of the heavy lifting, but I ran into a problem this morning.  On my 'list' screen (the one that shows several of the items for sale), I wanted to display one of the images for each item.  Simple, I figured.  I added a property to the user control we use to render the whole list of images on the detail screens and added a property to control whether it showed one image or all of them.  Then, in the OnDataBinding method, I added code to check for that property and only load the data for one of the child images if it was set (as opposed to loading the data for all of them like we did on the detail pages).  I added the DynamicFieldControl entry to the list screen to display this field and set the 'only show one image' property, but no luck -- I got no image.  I added a breakpoint and sure enough, the Images EntitySet had a count of 0 and was marked as loaded.  When I clicked on my link to see the details, I saw all the images without issue.  So, I started digging....  In System.Web.UI.WebControls.LinqDataSourceView, I found this code:

image

I saw the 'CanDelete/CanInsert/CanUpdate' check and it made me curious....  Here's the declaration of the LinqDataSource from my details screen (that worked):

    1     <asp:LinqDataSource ID="DetailsDataSource" runat="server" EnableInsert="true" EnableUpdate="true" TableName="Items" >

    2         <WhereParameters>

    3             <asp:DynamicQueryStringParameter />

    4         </WhereParameters>

    5     </asp:LinqDataSource>

And here's the code from my list screen that didn't:

    1     <asp:LinqDataSource ID="GridDataSource" runat="server" TableName="Items">

    2         <WhereParameters>

    3         </WhereParameters>

    4     </asp:LinqDataSource>

So, on a whim, I added 'EnableInsert="true"' to my list screen, and sure enough, now my child collection is getting populated like I need.  I'm not sure why this makes a difference (well, I know it leaves object tracking enabled, but I don't know why that makes a difference), but "it works for me"...