This is a migrated thread and some comments may be shown as answers.

set [Readonly] attribute programmatically

3 Answers 126 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Naseem
Top achievements
Rank 1
Naseem asked on 24 Oct 2013, 03:15 AM
Hello,

 In PropertyGrid we can set [Readonly(true)] attribute to make a property readonly , but status of my property will change at run time. I was wondering if there is any way to set [Readonly] attribute programmatically?

Many thanks,

Kind regards,
Naseem

3 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 24 Oct 2013, 06:57 AM
Hi Naseem,

PropertyDefinition has IsReadOnly property that you can work with. Check out this article for a reference. 

Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Dennis
Top achievements
Rank 1
answered on 17 Oct 2014, 12:45 PM
How can I set this and other attributes programmatically in a WinForm PropertyGrid.    At runtime, I'm adding items to the propertystore and need to set the type of editor, aspects such as treat this like a password, drop down list of choices with a defined list, etc.    Standard editors exist for all these items, but the only way I can see to set them is via attributes on properties in a class and not at runtime.
0
Maya
Telerik team
answered on 20 Oct 2014, 07:04 AM
Hi Dennis,

If you are working with RadRropertyGrid for WinFoms, please drop a line at the corresponding forum. Otherwise, the thread here will become a bit confusing whether the answers targets Silverlight or WinForms.
Thanks a lot for the understanding. 


Regards,
Maya
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
PropertyGrid
Asked by
Naseem
Top achievements
Rank 1
Answers by
Maya
Telerik team
Dennis
Top achievements
Rank 1
Share this question
or