473,595 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display properties in PropertyGrid


Hi, NG!
Does anyone have any hint on how to get the PropertyGrid control to display
more user-friendly "property" names, i.e. names that contain spaces, just
the way the VS IDE does when you select a file in Solution Explorer to view
its properties ("Build Action", "Copy to Output Directory" etc)? How are
those strings displayed since they don't seem to be real property names as
they contain spaces? I'm trying to achieve this in C#...

Thanks in advance.

pax
Dec 19 '05 #1
5 5739
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDes criptor interface found in the
System.Componen tModel namespace, override the GetProperties() and create
your own PropertyDescrip tors overriding the DisplayName property.

Gabriel Lozano-Morán
MCSD .NET
Real Software
http://www.realdn.net
http://www.realsoftware.be

<pax> wrote in message news:ua******** ********@TK2MSF TNGP14.phx.gbl. ..

Hi, NG!
Does anyone have any hint on how to get the PropertyGrid control to display more user-friendly "property" names, i.e. names that contain spaces, just
the way the VS IDE does when you select a file in Solution Explorer to view its properties ("Build Action", "Copy to Output Directory" etc)? How are
those strings displayed since they don't seem to be real property names as
they contain spaces? I'm trying to achieve this in C#...

Thanks in advance.

pax

Dec 19 '05 #2
Thanks a lot, Gabriel. There's a lot of information in your swift reply, I
hope I'll be able to find my way through...
And yes, the class should be mine, I guess there would be nothing to expect
if it were not mine.

Thanks.
pax

"Gabriel Lozano-Morán" <gl*****@no-spam.org> wrote in message
news:OT******** ******@tk2msftn gp13.phx.gbl...
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDes criptor interface found in the
System.Componen tModel namespace, override the GetProperties() and create
your own PropertyDescrip tors overriding the DisplayName property.

Gabriel Lozano-Morán
MCSD .NET
Real Software
http://www.realdn.net
http://www.realsoftware.be

<pax> wrote in message news:ua******** ********@TK2MSF TNGP14.phx.gbl. ..

Hi, NG!
Does anyone have any hint on how to get the PropertyGrid control to

display
more user-friendly "property" names, i.e. names that contain spaces, just the way the VS IDE does when you select a file in Solution Explorer to

view
its properties ("Build Action", "Copy to Output Directory" etc)? How are
those strings displayed since they don't seem to be real property names as they contain spaces? I'm trying to achieve this in C#...

Thanks in advance.

pax


Dec 19 '05 #3
Gabriel Lozano-Morán wrote:
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDes criptor interface found in the
System.Componen tModel namespace, override the GetProperties() and create
your own PropertyDescrip tors overriding the DisplayName property.

Gabriel Lozano-Morán
MCSD .NET
Real Software
http://www.realdn.net
http://www.realsoftware.be

<pax> wrote in message news:ua******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi, NG!
Does anyone have any hint on how to get the PropertyGrid control to


display
more user-friendly "property" names, i.e. names that contain spaces, just
the way the VS IDE does when you select a file in Solution Explorer to


view
its properties ("Build Action", "Copy to Output Directory" etc)? How are
those strings displayed since they don't seem to be real property names as
they contain spaces? I'm trying to achieve this in C#...

Thanks in advance.

pax


Here's what I found a year ago when implementing property grid
customizations:

http://www.codeproject.com/vb/net/us...opertygrid.asp
http://www.codeproject.com/cs/miscct...ectiondata.asp
http://www.codeproject.com/vb/net/Pr...rid_Editor.asp
http://www.codeproject.com/csharp/Dz...tionEditor.asp

http://stup.org/blogs/nidhogg/archiv...02/18/279.aspx
http://www.codeproject.com/cs/miscctrl/DynPropGrid.asp

HTH,
Andy
--
To email me directly, please remove the *NO*SPAM* parts below:
*NO*SPAM*xmen40 @*NO*SPAM*gmx.n et
Dec 19 '05 #4
An example found using google:
http://216.239.59.104/search?q=cache...playname&hl=nl

Gabriel
Dec 19 '05 #5

Thank you very much, Andreas.
"Andreas Mueller" <me@privacy.net > wrote in message
news:40******** *****@individua l.net...
Gabriel Lozano-Morán wrote:
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDes criptor interface found in the
System.Componen tModel namespace, override the GetProperties() and create
your own PropertyDescrip tors overriding the DisplayName property.

Gabriel Lozano-Morán
MCSD .NET
Real Software
http://www.realdn.net
http://www.realsoftware.be

<pax> wrote in message news:ua******** ********@TK2MSF TNGP14.phx.gbl. ..
Hi, NG!
Does anyone have any hint on how to get the PropertyGrid control to


display
more user-friendly "property" names, i.e. names that contain spaces, justthe way the VS IDE does when you select a file in Solution Explorer to


view
its properties ("Build Action", "Copy to Output Directory" etc)? How are
those strings displayed since they don't seem to be real property names asthey contain spaces? I'm trying to achieve this in C#...

Thanks in advance.

pax


Here's what I found a year ago when implementing property grid
customizations:

http://www.codeproject.com/vb/net/us...opertygrid.asp
http://www.codeproject.com/cs/miscct...ectiondata.asp
http://www.codeproject.com/vb/net/Pr...rid_Editor.asp
http://www.codeproject.com/csharp/Dz...tionEditor.asp

http://stup.org/blogs/nidhogg/archiv...02/18/279.aspx
http://www.codeproject.com/cs/miscctrl/DynPropGrid.asp

HTH,
Andy
--
To email me directly, please remove the *NO*SPAM* parts below:
*NO*SPAM*xmen40 @*NO*SPAM*gmx.n et

Dec 19 '05 #6

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

Similar topics

1
1440
by: mrVithan | last post by:
I create a user control object and show its properties through a propertygrid object in my application. It is sure that there are 100 hundred of properties inherited from System.Windows.Forms.UserControl and they are all showed on the propertygrid. Is there a way i can hide all these inherited properties and show only my user control's properties ?
0
1529
by: Peter Verburgh | last post by:
Hello, I'm using PropertyGrid control to show the properties of an control. There are standard properties for each usercontrol like "Cursor, Dock ,...ect" I don't want to show this properties in the Propertygrid control , but i want only show m custom made properties. How can i easy hide those properties ?
2
1530
by: JJ L. | last post by:
Hello. I have a project that consists of nine different objects, each serving their own purpose. In the past I have just created a form for each one, and then whenever you call, say, object.Display(), it would call up the form associated with that object. This form only displays information, it doesn't allow the user to edit any information. Is it possible to find the properties of a certain object, and then loop through creating labels...
2
14310
by: X.W. | last post by:
Hi group, I have a class like this: class Person { public uint Age { get{...} set{...} }
2
1299
by: Benny Raymond | last post by:
I'm working on a program that has a treeview, and each tree node refrences a row in my database. I really like how the properties section of the collections editor looks - is this a control that is available to use? I thought it was a datagrid, but I can't get the datagrid to show up like the collections properties thing. Any help would be awesome thanks! ~benny
0
942
by: ljlevend | last post by:
I am exposing a property as an expandable property in a PropertyGrid by assigning a System.ComponentModel.TypeConverter attribute to the property. Is there any way to have the PropertyGrid group the expanded items in categories as is done with PropertyGrid.SourceObject's properties when PropertyGrid.PropertySort = CategorizedAlphabetical? Thank you, Lance
4
35930
by: Steve | last post by:
I am using a property grid to display a classes properties, all is OK for single value properties but i need to display a list of strings for the user to select from and update the property value based on the selection. A Drop down list in the property grid would be ideal. For instance - like the StartPosition property of a form in the IDE. I think this would be a simple and often used procedure but i have not been able to locate an...
3
2131
by: ippo | last post by:
Hi all, I have a silly problem with treeview. I'm using .NET 2.0. I need to set the two properties treeNodeSrc - treeNodeTypeSrc at run time using C#, but in the treeViews that I define, these two properties don't exist!!! Do I need to import something more to use all the properties of the treeview? Right now, I 've just installed .NET 2005 Thank you all
3
5119
by: michelqa | last post by:
Hi, I have a form with a control..(a button for example). Then the control properties are displayed in a propertyGrid control. Is there any simple way to remove some unwanted properties from the propertyGrid....removing the "AccessibleName" properties by example? Any example about how to play with the PropertyDescriptorCollection to remove some properties??
0
7883
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8379
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8019
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8251
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6674
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5839
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5418
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3873
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
1223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.