I seem to remember this being possible, but I can't find a single thing about
it now..
I have a datagridview that is bound to a bindinglist of type 'foo'. Foo is
a business object with a number of public attributes.
I want to prevent the datagridview from binding to some of these public
attributes. I can do it in the datagridview, but as I remember, there are
some attributes that I can apply to the public attributes in Foo that will
change how they bind to the datagridview. Is my memory faulty? If not, can
you give me some of the attributes so that I can search on those? TIA.
It might be that I'm mixing up the datagridview with the property grid,
which does use reflection to examine the attributes of public properties in
the object that is bound to the property grid....
Frans Bouma [C# MVP] - 14 Sep 2006 17:49 GMT
> I seem to remember this being possible, but I can't find a single
> thing about it now..
[quoted text clipped - 12 lines]
> grid, which does use reflection to examine the attributes of public
> properties in the object that is bound to the property grid....
By default the BindingSource filters properties which have the
attribute Browsable(false) applied to them. You can set a different
attribute on the bindingsource if you want. Thought Browsable(false) is
pretty common for this.
Frans

Signature
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------