Foreign Key Inferred Name

So I'm a complete noob to Dynamic Data. My team set up a Dynamic Data website which we're essentially using for scaffolding...we have an already existing DB schema which we plugged it into. And it works perfectly! 

One thing though - the Dynamic Data code automatically infers a friendly name when generating a drop down list for a foreign key. In our case, we have a "Contacts" table, and the primary key is ContactID, and the first field in the table is "First_Name", and this is what is showing up in the drop down menu. So for instance, when adding or editing an entry in our "Entry" table, it has a foreign key which points to the Contacts table, and it automatically generates a drop down list which friendly names that it has inferred. But the friendly name it picked was the "First_Name" column of the Contact table...which isn't so helpful. For a contact name, you'd probably want first name + last name and maybe even add the company name as well. 

So how do I change the site and/or data model so that when it creates a drop downlist as a foreign key relationship from my Contacts table, it concatenates the first name and last name columns instead of just displaying the first name column?

Thanks!

 

0
onisemus
11/24/2008 4:28:37 PM
asp.net.dynamic-data 1365 articles. 0 followers. Follow

2 Replies
563 Views

Similar Articles

[PageSpeed] 35

I just blogged on this exact problem. See this post.
 


Rick -ASP.Net UE  My DD Blog  DD FAQ
0
ricka6
11/24/2008 4:47:01 PM

 Couldn't have asked for a more straightforward answer - exactly what i was looking for! thanks!!

0
onisemus
11/24/2008 8:24:09 PM
Reply:

Similar Artilces:

Dynamic Data Foreign Key Column empty data
I have two tables that are related via a foreign key. All the data is in the database and displays correctly using a sql query. When I run my dynamic data project the table that linked via the foreign key the, foreign key column stops showing data half way through. Also the filter dropdown also stops showing data half way through as below from view source:        <option value="2863">2863</option>        <option value="2864">2864</option>        <...

Understanding foreign keys and relationship columns in Dynamic Data
I just wrote a little blog post to clarify a somewhat confusing area. David...

customize the layout of "foreign key" in metadata dynamic data
Hi,  I have a dynamic data website. Automaticly all the foreign keys fields display as link. How can I take away the link and shows foreign keys data normaly? Help:-)))      best regards,   Saba   Try this article here Making a Field Read-Only via the ReadOnlyAttribute – Dynamic DataSteve Seeking the elegant solution.[Oh! If olny I colud tpye!]c# Bits blogOh, and don't forget to mark as answer any posts that help you The next version of Dynamic Data will support the ReadOnly(false) attribute on columns.Rick -ASP.Net UE  My DD Blog  DD FAQ...

Querying a Table By a Data Key in Dynamic Data
Check out this post:  http://blogs.msdn.com/morebits/archive/2009/01/30/querying-dynamic-data-table-by-a-data-key.aspx  It describes how to query a child table using a column from a parent table.  The parent table contains the data key that is the foreign key in the child table. This posting is provided "AS IS" with no warranties, and confers no rights.I blog at: Technical Notes See also this series that also covers similar The Anatomy of a FieldTemplate. Your First FieldTemplate. An Advanced FieldTemplate. A Second Advanced FieldTemplate. An ...

Dynamic Data over ADO.NET Data Service
I would like to create a dynamic data web site that does not have a database connection to the underlying database, but instead accesses the data through an ADO.NET data service.  Is this possible?  Thanks,Dennis If you look at the Dynamic Data Futures solution on CodePlex, it has an early version of something that does that.  Also, see this thread. thanks,David David,  That's exactly what I was looking for.  However, I am running into a problem when I try to develop my own dynamic data client site.  I created a dynamic data web site, added a referenc...

Dynamic Data And Ado.Net Data Service
Hi,I'm wondering if it is possible to mix up Dynamic Data and Ado.Net Data Service.I have found no information on google yet.Thanks for your replies, Hasan Yes you will be able to have a look at the Preview on Codeplext here the new Domain Service will allow this sort of thing see David Ebbo's and Nukhil Kothari's sessions at mix09 Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms .NET RIA Services - Building Data-Driven Applications with Microsoft Silverlight and Microsoft ASP.NETSteve Seeking the elegant solution.[Oh! If olny I colud tpye!]c# Bits...

Dynamic Data with ADO.NET Data Services
Is it currently possible to use Dynamic Data with ADO.NET Data Services? I've had a play with this to see if this would work but I didnt have much luck. I ran the datasvcutil.exe against my service (which is a  ADO.NET Data Services on a LINQ to SQL model) but I ended up with a "The context type 'Entities.NorthwindDataContext' is not supported" message.  It seems to make sense that these technologies would work together...is there something else I am missing? Perhaps this functionality isn't supported yet? Thanks, Craig Hi Cr...

Dynamic Data with ADO.NET Data Services #2
I'm using the DynamicData Futures Preview 2 DLL's to create an n-tier Dynamic Data website using ADO.Net Data Services.I'm trying to add Many-to-Many relationship support using David Ebbo's article as a basis, but it would appear that the client-side model generated by DataSvcUtil.exe (Add Service Reference....) doesn't contain enough information to identify Many-to-Many relationships?For example, I have Contacts and Regions joined through a ContactRegion table.  EF models this correctly on the server and DataServices exposes it correctly - With a Contact having a Re...

Dynamic Data working against an ADO.NET Data Service
 Is there an example available of Dynamic Data using an ADO.NET Data Service?  I read there are prototypes of this in the works, are they available for review / use?  Check out our Dynamic Data Futures for a prototype data source control for consuming ADO.NET Data Services. http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14475.Scott HunterPM, ASP.NET Team, Microsoft...

Code builders INSERT Data Method
PLEASE HELP I would like to insert the 'primary key' value into a foreign key table each time a record is insert using the: Web Matrix-Code builders-INSERT Data Method All help greatly appreciated......

Can I use ADO.NET Data Services with Dynamic Data Websites?
I would like to use Dynamic Data Websites with the proxy class generated from WebDataGen.exe.  Is this possible?  Also, does the SchemaCreator class support the Provider model? In the current CTP, Dynamic Data only supports Linq To Sql models.  In th next release, it will also support Entity Framework models.  However, it won't directly support ADO.NET data services, though we are looking at this scenario for a later release. thanks,David...

Foreign key name
Hi all, I am using PD 11 . The scenario is: when I create two relations between 2 tables (one with role name and the other without role name) then generate the physical model, and use the %PROLE% as FK column name . when the model generates , one FK gest the role name and the others that hadn't role gest the table name as FK. I want to change the default of tabel name to column name is there any one that knows the solotion? regards, The default behavior is for the parent table column name to be used as the FK column. The columns from the first reference should be the ...

Foreign Key Names
I can't seem to figure out where to set the Foreign Key Naming convention. As I generate from a CDM to PDM how do I take control of how relationships are migrated and named. and, what documentation should I read to get a better handle on this? OK, you do not have any control over the default foreign key names in the initial CDM -> PDM generation. However, after you change it in the PDM, the next time you generate PD will abide by your names. -- Michael F. Nicewarner [TeamSybase] psyclo@datamodel.org http://www.datamodel.org "Coy Lay" <coy.lay@acm.c...

Name of foreign key
Hello ! I am working on a program we bought. The previous developpers used PowerAMC and I can't find where they precised the way to name foreign keys. Exemple : if the table "Bill" has a reference to the table "Supplier", when I generate the MPD, the reference is converted this way in the table BILL : ID_SUPPLIER. I want to know where "ID_%TABLE%" is defined ? Otherwise, is it possible for certain foreign keys to define in the MCD the name they will have in the MPD ? Exemple : I have an other table where I want one foreign_key to have a special n...

Web resources about - Foreign Key Inferred Name - asp.net.dynamic-data

The U.S. Mood, As Inferred From Twitter
Happy in the mornings and evenings, bummed at work.

Inferred impressions
... than skin deep, and a variety of other cliches advising against snap judgement. What’s a marketer to do? Impactful first impressions are inferred ...

Windows RT Tablet Prices and Release Dates Inferred
Microsoft (NASDAQ:MSFT) hints at Windows RT tablet prices and their release dates. Another one of Redmond's mammoth blog posts is getting the ...

Google Now Adds "Inferred Events," Suggests Calendar Events From Email
Google Now just keeps getting smarter. As Android Police reports, Google has started offering to add events to your Calender by way of Google ...

Journal of Human Genetics - The history of human populations in the Japanese Archipelago inferred from ...
Journal of Human Genetics, official journal of the Japan Society of Human Genetics, publishes original articles and reviews on all aspects of ...

Know Thy User! GraphDive Distills Inferred Demographic and Interest Graph Data from Social Feeds
... on the e-commerce, media and travel verticals, delivers personalized user recommendations through ranked user interest graphs and inferred demographic ...

Galaxy S5 Zoom specs leak out again, much slimmer chassis than the S4 Zoom is inferred
We don't get phone specs written down with actual pen on actual paper every day, so stop and smell the... ink, reveling in the moment for a while. ...

Survival of the prettiest: Sexual selection can be inferred from the fossil record
Detecting sexual selection in the fossil record is not impossible. The term "sexual selection" refers to the evolutionary pressures that relate ...

Aha! Google Buzz Is A Black Hole — Its Traffic Must Be Inferred
My bad — maybe. Earlier today, I reported that Google Buzz, Google's new social sharing service, was sending less traffic than FriendFeed, a ...

Diet of ancient Egyptians inferred from stable isotope systematics
Screen reader users, click here to load entire article This page uses JavaScript to progressively load the article content as a user scrolls. ...

Resources last updated: 1/3/2016 5:26:02 PM