Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2006

Tip: Looking for answers? Try searching our database.

PropertyGrid-adding properties at runtime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
FUnky - 22 Mar 2006 08:58 GMT
Hi all,

I would like to add properties to the propertygrid control at runtime. There
I would like to specify four things:
a. Property Name
b. Property Value
c. Property Category
d. Property Ordering

Can somebody plz guide me to do this?
Many thanks in advance.

FUnky
Dmytro Lapshyn [MVP] - 22 Mar 2006 09:21 GMT
Hi,

As far as I remember, to customize the list of properties displayed by the
PropertyGrid control, one needs to implement the ICustomTypeDescriptor
interface.

> Hi all,
>
[quoted text clipped - 9 lines]
>
> FUnky
Stoitcho Goutsev (100) - 22 Mar 2006 15:23 GMT
FUnky,

If you want to add/remove properties to/from selected object in the property
grid you can do that from the TypeConverter for the object's type. You need
to implement GetPropertiesSupported and GetProperties methods.
The properties that trigger adding/removing other properties needs to be
attributed with RefreshPropertiesAttribute.

Signature

HTH
Stoitcho Goutsev (100)

> Hi all,
>
[quoted text clipped - 9 lines]
>
> FUnky

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.