Hide a property in derived class in propertygrid

G

Guest

Hi all,

how can I hide a property in a derived class in a propertygrid.

Let's say I have a classX and a derived classY. A property in classX will be
visible in the propertygrid but the same property in the derived classY will
not be visible in the propertygrid.

Does anyone know how to do this ?
 
J

John Vottero

MauriceM said:
Hi all,

how can I hide a property in a derived class in a propertygrid.

Let's say I have a classX and a derived classY. A property in classX will
be
visible in the propertygrid but the same property in the derived classY
will
not be visible in the propertygrid.

Does anyone know how to do this ?

Override the property and add the [Browsable(false)] attribute.
 
G

Guest

Thx John, I'm going to try this out. Sounds very logic.

John Vottero said:
MauriceM said:
Hi all,

how can I hide a property in a derived class in a propertygrid.

Let's say I have a classX and a derived classY. A property in classX will
be
visible in the propertygrid but the same property in the derived classY
will
not be visible in the propertygrid.

Does anyone know how to do this ?

Override the property and add the [Browsable(false)] attribute.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top