I want to disable the most of the controls in the form. is there a way to do it for all of them at the form level.
also, I have a requirement of NOT greying out the controls when they are disabled.
thanks for your advice and help in advance.
regards,
Khizar
3 Answers, 1 is accepted
0
Stefan
Telerik team
answered on 06 Jul 2010, 01:57 PM
Hello Khizar Khan,
Thank you for writing.
Our controls provide a Visible property for each control/element except for the main form. Once you set it for a certain element to false this element and its descendants will not appear. For instance, if you have a panel with few buttons, and when set the Visible of the panel to false, the panel and the buttons will hide.
The only way to hide all elements in a Form is when you have your MainForms' isMDIcontaier enabled, and you have inserted some child forms in there. Now you can call the child form Visible property and it will hide the form and its children.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
but I dont want to change the visibility, I want to disable them without changing their appearance.
Regards,
Khizar
0
Nikolay
Telerik team
answered on 09 Jul 2010, 03:43 PM
Hi Khizar,
Please accept our apologies for misunderstanding you.
You can set the Enabled property of all controls on a form at once by setting the Enabled property of the form itself:
this.Enabled = false;
As to your second requirement, Telerik Presentation Framework provides a way to keep the original look of RadControls while they are disabled. To do so, you need to set the UseDefaultDisabledPaint of the controls' RootElements to false, for example:
I hope this helps. If you have additional questions, feel free to contact me.
Sincerely yours,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items