views:

51

answers:

0

I'm using ASP.NET dynamic data to create a ticket edit form. The Ticket is associated to a problem code, but not using the problem code's primary key. (The database is 3rd party, so I don't have control over that...)

So the problemCode looks basically like:

ProblemCode
(
    ID int,
    Code varchar(8),
    Description varchar(250)
)

The association is between Ticket.ProblemCode and ProblemCode.Code

Now the problem is that ForeignKey_Edit (really, PopulateListControl) fills the dropdown with the Primary Key which is ID... but the ticket is actually using Code to tie the two together. Am I missing something? Is there a simple way to get it to use Code as the value instead?

If not I can probably eliminate ID from the view as I don't think it HAS to be used anywhere... I just like having an ID around.