PropertyGrid & EntityFramework

Jun 19, 2012 at 5:59 PM

I would like to use the PropertyGrid with EntityFramework generated entities but I've run into a slight problem.

Is there a way to tag EF generated entity properties with attributes so that I can control the appearance in the propertygrid?  For example, I would like to add a [Browsable(false)] attribute to a property.

I tried adding the [MetadataType] attribute to a partial class and then specified the attributes on properties in the metadata class but propertygrid seemed to ignore them.  Any other ideas?

Jun 19, 2012 at 7:15 PM

You can try putting: AutoGenerateProperties = "False" "and set the properties manually ..

I believe that the component does not have the flexibility you need.