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
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 >>
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.