Can't modify properties of a RadGridView inherited from a base form

4 posts, 1 answers
  1. Man Sai
    Man Sai avatar
    2 posts
    Member since:
    Sep 2015

    Posted 24 Sep 2015 Link to this post

    Hi,

    I have a base form with a RadPageView and one RadPageViewPage. I dropped two RadPanel and one RadGridView into the RadPageViewPage. I set the modifier property of all this five controls to public. And then I save this RadForm.

     I created a second RadForm and inherited this one from the previous one. In this second form I can see all the controls in the designer. I can modified the properties of the two RadPanels but I can't modified the properties of the RadGridView in the properties windows.

     What can I do in order to modified the properties of the RadGridView of the second form at design time ?

     

     

     

     

     

     

  2. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 25 Sep 2015 Link to this post

    Hi Man,

    Thank you for writing.

    This is a known issue of Windows Forms design-time in general. Some complex controls cannot be reliably edited and are therefore the visual inheritance is disabled. More information can be found in the following discussion: c# - DataGridView locked on an inherited UserControl.

    I hope this will be useful.

    Regards,
    Dimitar
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Man Sai
    Man Sai avatar
    2 posts
    Member since:
    Sep 2015

    Posted 25 Sep 2015 in reply to Dimitar Link to this post

    Hi Dimitar,

    Thanks for the clarification.  I thought it was something regarding RadGridView because I coud modify RadPanel's properties but not RadGridView's but it's a known issue of the designer.

    I followed your link and found a workaround by creating a usercontrol:

        [System.ComponentModel.Designer(typeof(System.Windows.Forms.Design.ControlDesigner))]
        public class ucRadGridView : Telerik.WinControls.UI.RadGridView { }

    I tried this and it seems to work fine. I can modify ucRadGridView's properties in the subclass form.

    I guess the Designer attribute is forcing the designer to unlock this control at design time but I don't know if there are other side effect.

    Would you recommend this workaround ?

    Do you know of any other side effects or problems when using this workaround ?

    Thanks,

    Man Sai.​

     

  5. Answer
    Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 29 Sep 2015 Link to this post

    Hi Man,

    Thank you for writing back.

    I have tested this and it appears that there are no issues when this workaraund is used. However, I cannot guarantee that it will work in all cases. Please note that generally using a grid in parent form is not a common case and perhaps you should consider adding your grids to the child forms (this shouldn't slow down the development process because usually a single form does not contain many grids). Another approach would be to leave the grid in the parent form and change its properties in the code behind.

    I hope this information helps.

    Regards,
    Dimitar
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top