locked
Hide filters that are generated by foreign key in the List page RRS feed

  • Question

  • User1322635947 posted

    Hi all,

    I did some research on this. It shows that I can use "DisplayAttribute(AutoGenerateFilter = false)" to sovle it but it doesn't work to me.

    Please advice.

    p.s. I am use Dynamic data 4 with visual studio 2010

    Thanks.

    Sunday, August 21, 2011 8:05 PM

Answers

All replies

  • User-1488931086 posted

    "DisplayAttribute(AutoGenerateFilter = false)" to sovle it but it doesn't work to me.

    Your codes plz

    Tuesday, August 23, 2011 2:35 AM
  • User3866881 posted

    Hi r6321426:)

    You can have a try like this, suppose this is a meta data sample:

    [MetadataType(typeof(EmployeeMD))] public partial class Employee { public class EmployeeMD {
            [Display(Name = "Last Name", Order = -9,
                Prompt = "Enter Last Name", Description="Emp Last Name")]
            public object LastName { get; set; }

            [Display(Name = "Manager", AutoGenerateFilter=false)]
            public object Employee1 { get; set; }
        }
    }

    See at: http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.displayattribute.autogeneratefilter(v=VS.100).aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 23, 2011 9:10 PM