Visual Inheritance

9 posts, 2 answers
  1. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 11 Jan 2011 Link to this post

    I'm trying to inherit from a base form with a telerik grid. The grid's modifier is set to protected. On the inheriting form, the grid appears but completely disables as if it's modifier is Privet (it's not). Other controls (Microsoft + Telerik) are not showing this behaviour. They are working properly when their modifier is set to protected.

    Kindly help me in this regard.
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 11 Jan 2011 Link to this post

    Hello,

    The access modifier shouldn't make any difference on whether the grid is enabled. Please can you provide a code sample and I'll be happy to take a look at it for you.
    Thanks
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 12 Jan 2011 Link to this post

    I have a solution uploaded here that is presenting the behavior. Kindly have a look at it. All other controls are modifiable in the inherited form as their access modifier is set to Protected. All except the Grid.
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 12 Jan 2011 Link to this post

    Hello,

    This seems to be an issue with the property designer. You can still reach the grid programatically.
    Hope that helps
    Richard
  6. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 12 Jan 2011 Link to this post

    The same thing is happening in RibbonBar. I can attempt to kill all my time by doing the grid from code but I can't do the Ribbon. Any other suggestion please? I'm a bit desperate here.
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 12 Jan 2011 Link to this post

    Hello,

    I'm afraid not at the moment. I tried moving the base form into the same project and making the grid public, but it has the same effect. I'm sure there is a good reason, but I can't think why at the moment.
    Richard
  8. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 12 Jan 2011 Link to this post

    Hello,

    Actually, this makes sense because you are inheriting from the form and not the grid. Try it by also adding a standard Microsoft datagrid, and it will be the same.
    Regards,
    Richard
  9. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 12 Jan 2011 Link to this post

    This grid for the search forms is gonna have many properties common. Do you see any way around this then? Can I somehow have a grid called SearchGridView that inherits RadGridView with my properties set in a separate BaseControls Projects?
  10. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 12 Jan 2011 Link to this post

    Hello,

    In our own prjects, we have many base controls too, but we create separate base form, and base grid controls. We can then just drag on a base grid onto one of our base forms.
    Let me know if you need further assistance.
    Richard
Back to Top
UI for WinForms is Visual Studio 2017 Ready