I am doing some tests with my trial version of RadControls for WinForms. One common way we used to make forms is to create the "master" forms, and then inherit and customize it to concrete requeriments. Well, I am trying to create a "master", let's say "MasterForm" form with this content:
One RadTextBox, one RadPanelBar and one RadGridView. As usual, I've changed the component's modifiers to protected, in order to be able to edit them in child forms.
Now I create a specific form, let's say "CustomersForm" inheriting from "MasterForm". All right, the components shows but... what?! the RadTextBox properties can be edited, but both RadPanelBar and RadGridView are locked (despite the fact that I can see, in the child form, that modifier is set to protected. Also, I can see the locked icon over the components when I select them.
I have tried the following:
1) Make sure that component's modifiers are set to protected instead of private
2) Rebuild entire solution to ensure that assemblies are refreshed
3) Unload / Reload the project
4) Close / Open Visual Studio
I don't know what else to do in order to get them unlocked and modify their properties in child forms...
Thank you so much.
11 Answers, 1 is accepted
Thank you for the question. This is a known issue of Windows Forms design-time in general. Some complex controls cannot be reliably edited and are therefore disabled. Please have a look at this blog post. Also please note that the standard Microsoft DataGridView also cannot be edited in that specific case.
Please write again if you have other questions.
the Telerik team
Thank you so much.
There is no problem with RadControls. The Visual Studio designer purposefully disables some controls in a visual inheritance scenario. When you have such a case you are usually better off making settings at run-time. Also you should not explicitly associate RadGridView with the standard ControlDesigner as there is a huge amount of functionality in the RadControlDesigner that you are omitting this way.
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.
Thank you for writing.
You are allowed to use any access modifiers for the controls, like you do with every single field in C#. What modifiers are used depends on you and your case. For example our EditAppointmentDialog uses protected modifier for all of its controls. This way our customers can easily inherit this form and rearrange the controls in it.
Please note that you can only change this in the form where the control is originally created - not in the inherited form.
I hope this information helps.
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.
This is how the Visual Studio designer works (some complex controls cannot be reliably edited and are therefore the visual inheritance is disabled) and this is not connected to our functionality. There is another post that explains how you can access the properties window in the inherited form. There is a sample project as well: Can't modify properties of a RadGridView inherited from a base form - GridView.
Should you have any other questions do not hesitate to ask.
Yea, i see that. I found my own work around, as the grid control itself is a user control (don't want any changes to it properties, other than DOCK and/or ANCHOR). So, I just placed the RadGridView in a RadPanel and set the dock on the grid to FULL. Set the modifiers on the panel to protected, now I can move, resize, etc all I need. Thanks for the response.
I am glad that you have found a solution. Do not hesitate to contact us if you have other questions.