Dynamic Data: how to filter dropdown for foreign key on edit page
- by Leonv
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