I’m very new to asp.net, but I found setting up a scaffolded website for an existing database is super simple. I have it up and running.
Making things work the way I want is a bit more tricky.. I have a Customer table with a one-to-many relationship with the ContactMoment table. By default the detail view of Customer show a link to view the ContactMoments (which is defined in the FieldTemplate called Children by default). What I would like is to include a ListView of all the ContactMoments.
I tried the following:
<asp:ListView runat="server" ID="DynamicControl2" DataMember="ContactMoment" />
This does not work. I probably need to use the DataSourceID, but I have no idea how te retrieve that from the current entity. Could someone point me in the right direction? Thanks 🙂
Update: I just found Dynamic Data Extensions which lists the following interesting bit. (unfortunately the project seems abandoned..)
- ChildrenList – Provides a way to show child tables, works in conjunction with the new Edit and Details page templates.
You need to add an extra datasource and Listview Control to get the result you want..
I haven’t tried this Code but it should work… make changes to Entity names according to your actual Names..
Now you just need to add Column you want to display in Listview’s markup..
Hope this helps…