473,412 Members | 5,385 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Hide a property in derived class in propertygrid

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 ?
May 20 '07 #1
2 2122
"MauriceM" <Ma******@discussions.microsoft.comwrote in message
news:EF**********************************@microsof t.com...
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.

May 20 '07 #2
Thx John, I'm going to try this out. Sounds very logic.

"John Vottero" wrote:
"MauriceM" <Ma******@discussions.microsoft.comwrote in message
news:EF**********************************@microsof t.com...
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.
May 20 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: siddhiash | last post by:
Hi Friends I want to add PasswordChar Property which shows ****** for string which I type in PropertyGrid Control. Regards, Siddharth
3
by: Lance | last post by:
I have a situation where I want to show a property when one object is selected in a PropertyGrid, but I want to hide that property when more than one object is selected. For example, lets say I have...
4
by: Paul Wu | last post by:
Is there a way to constract a derived class that hides certain public members of a base class ? With the following code, a class that derives from DerivedClass can still see the member "Name" in the...
9
by: Martin Widmer | last post by:
Hello! I would like to hide one property of a base class in a derived class. How could it be done? I tried to override it with a private property, but that doesn't seem to do the hiding. ...
1
by: Steve Teeples | last post by:
Using VS2005, is the a simple method to hide or show a property within a propertygrid based upon the changing value of another property within the propertygrid. For example, if I change a...
8
by: active | last post by:
If I create a UserControl that inherits from, say, Panel, and I do not want my UserControl to have a property that it inherits from Panel. How can I remove it. For example, I might not want by...
0
by: Tom Shelton | last post by:
On 2008-04-24, J-L <alphomega_sansca_@free.frwrote: I believe if you apply the BrowseableAttribute set to false to the property, then it won't show in the property grid: public in...
0
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
Assuming you mean a control which has a runtime only property, then apply the following attribute to the property: -- Ciaran O''Donnell http://wannabedeveloper.spaces.live.com
10
by: Derek Hart | last post by:
I can set focus to my property grid by using propgrid.Focus - but how can I set the default property that is always first? Or just set focus to the default property? Can this be done?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.