Dynamic Data: how to filter dropdown for foreign key on edit page
Posted
by Leonv
on Stack Overflow
See other posts from Stack Overflow
or by Leonv
Published on 2010-03-08T15:23:57Z
Indexed on
2010/03/09
7:21 UTC
Read the original article
Hit count: 603
I have Organisation with a foreign key to a Manager.
Managers can be active, or inactive.
On the Dynamic Data edit page for Organisation, I need to filter the dropdown for Manager to only show active records.
I started out by making a custom version of DynamicData\FieldTemplates\ForeignKey_Edit.ascx and setting a UIHint to the new field template on Organisation.Manager.
But, how to customize the linq or sql query that runs to load the Managers?
Using Linq-to-SQL and DynamicDataFutures
© Stack Overflow or respective owner