locked
Foreign Key Values RRS feed

  • Question

  • User-792560443 posted

    Hi, I have watched lots of videos on dynamic data and I think this could be very useful for me thanks!!! I am a complete newbie to asp.net and I have been struggling to get started with anything more complicated than displaying basic data in gridviews and filtering etc. I have just created the same system from scratch using a dynamic data website and I have a few questions:

    1. This topic has been mentioned but I don't remember seeing an example? I want to change what column is displayed, instead of using the default one created by dynamic data. The two different examples I have of this are:

    - Zonelist is a list of dealers and is linked to Plans, Itinerary, etc. The system has chosen to display the DealerName on the link and I would like to use the DealerCode.

    - Plans are related to PlanDates, one-to-many relationship. Intead of the link being View Plan Dates, I would like it to display the first 'start' date for this Plan. The key is PlanID in Plan, PlanID,ReviewDate,ReviewTime in PlanDates (AM and PM records). Would I have to create a new custom page for this somehow?

    2. Filters - can you add / remove these? Also, they have chosen DealerName too to display but they are not listed alphabetically? Is it possible to show DealerCode and DealerName together?

    3. Some of the links do not seem to have created properly, the site throws up exception errors in a few places when I try to follow the relationship links, or on some of the filters too. For example the error is No Property or Field CustID1 exists in type 'Itinerary' when filtering on customers in the Itineraries form. Also, the same for CountryCode1 when trying to look at Itineraries from Countries.

    Thanks for any help on this. If I can get this working it is a huge head start for me :-).

    Sue

    Tuesday, October 14, 2008 12:25 PM

Answers

All replies

  • User-1005219520 posted

    >>I want to change what column is displayed, instead of using the default one created by dynamic data

    Use the DisplayColumn Attribute

    >>2. Filters - can you add / remove these?

    Filters are based on foreign key (or Boolean). You can use the DisplayColumn Attribute  to change what field is displayed. They keys are returned in the order of the referencing table.

    >>. Some of the links do not seem to have created properly, the site throws up exception errors

    See Dynamic Data Entity Framework Issues / FAQ / Samples (UPDATED 9/25)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 14, 2008 2:42 PM
  • User-330204900 posted

    2. Filters - can you add / remove these?

    Hi Sue, I did this article in a series DynamicData - Limit the Filter Fields and thought it may be of use here.

    Hope this helps [:D]

    Wednesday, October 15, 2008 5:20 PM