Another PropertyGrid Question

  • Thread starter Thread starter JezB
  • Start date Start date
J

JezB

The grid happily shows any public properties that has the Browsable
attribute set, but if I inherit public properties from some base class and
base my property grid on the new class, the property grid shows base class
properties but displays "Object reference not set to an instance of an
object" for them all - it only shows the additional public properties in my
new class correctly. Can anything be done about this ?
 
When you say "base my property grid on the new class" are you deriving a
property grid control from PropertyGrid?

Can you post an example of what you mean because the terms you are using are
not clear.

--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Read my Blog at http://bobpowelldotnet.blogspot.com
 
Do you call the base class' constructor also in your
derived class? If you don't probably many properties in
the base class are not initialized...
 
Yes that's exactly what I omitted - I thought it was a propblem with the
PropertyGrid rather than my own stupidity! - thanks.
 
Back
Top