Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Disable the default property (Read 1083 times)
muthuhamid
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 1st, 2009
Disable the default property
Apr 15th, 2009 at 1:52pm
Print Post  
Hi

Am am using the PropertyGrid control to show the properties of the selected node in runtime and allows user to change the properties. But some times need to disable the some properties, that user should not edit (No Modify allowed) in runtime. How can i do this.?
Pls help me in this regards.

Thanks
Hamid
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Disable the default property
Reply #1 - Apr 15th, 2009 at 2:48pm
Print Post  
Hi,

You can create a new (wrapper) class around the object displayed in the property grid and supply a reference to this wrapper class instead of the real object. The wrapper class will only expose the properties you would like to be visible in the grid.

There is a more versatile solution available, with a custom TypeConverter class, but it is a bit longer and more complicated.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint