Trying to add some different filters (in addition to the ForeignKey filter) to a Dynamic Data Website in VS2010 using EF4. I can add the new Filter templates, but how do I specify which template will get displayed for each property in my model?
Thanks
Here are the steps for how to do this:
1) Create a new UserControl for the filter you want under DynamicData\Filters. I created a TextFilter.ascx:
and the code behind:
Then in your model, just annotate your properties with the FilterUIHint attribute pointing to the next filter and you’re good to go:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel.DataAnnotations;
namespace Test.Model
{
public partial class Asset
{
#region Primitive Properties
…