473,397 Members | 1,972 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,397 software developers and data experts.

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 5727
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDescriptor interface found in the
System.ComponentModel namespace, override the GetProperties() and create
your own PropertyDescriptors 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****************@TK2MSFTNGP14.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**************@tk2msftngp13.phx.gbl...
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDescriptor interface found in the
System.ComponentModel namespace, override the GetProperties() and create
your own PropertyDescriptors 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****************@TK2MSFTNGP14.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 ICustomeTypeDescriptor interface found in the
System.ComponentModel namespace, override the GetProperties() and create
your own PropertyDescriptors 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****************@TK2MSFTNGP14.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.net
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*************@individual.net...
Gabriel Lozano-Morán wrote:
If you are trying to display properties for a class you control you can
implement the ICustomeTypeDescriptor interface found in the
System.ComponentModel namespace, override the GetProperties() and create
your own PropertyDescriptors 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****************@TK2MSFTNGP14.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.net

Dec 19 '05 #6

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

Similar topics

1
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...
0
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...
2
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,...
2
by: X.W. | last post by:
Hi group, I have a class like this: class Person { public uint Age { get{...} set{...} }
2
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...
0
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...
4
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...
3
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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
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...
0
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,...

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.