inherited from form, issue with radgrid

7 posts, 0 answers
  1. Patrick
    Patrick avatar
    14 posts
    Member since:
    Feb 2011

    Posted 14 Mar 2011 Link to this post

    Hello,

    i just created a "base" form for my project and added a radgrid. I've set the "modifier" - property to protected (radgrid).
    Now when i inherit from my base form the property - toolbox in VS 2010 is grey. (i cant edit properties).
    All other controls work as expected in this case.

    Is this a bug or did i forgot something?

    thx for help
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 14 Mar 2011 Link to this post

    Hello,

    Yes, this is the case no matter what you set the access modifier to.
    Please see the answers in this forum post and also this forum post for more information

    Hope this helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 14 Mar 2011 Link to this post

    Hello,

    What is the type of your project?, if you want to create a control you should create a class library project not a windows forms app.

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga
    Telerik WinForms MVP
  5. Patrick
    Patrick avatar
    14 posts
    Member since:
    Feb 2011

    Posted 14 Mar 2011 Link to this post

    This is what i did :)
  6. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 14 Mar 2011 Link to this post

    Thought so,

    Please change the type of your project and it will work with no problems.

    Best Regards,
    Emanuel Varga
    Telerik WinForms MVP
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 14 Mar 2011 Link to this post

    Hi Guys,

    Sorry Emanuel, I have to disagree unless there is something obvious I've missed. This is a VS issue with creating the visual designer for complex types. If you add a form to a class library and a grid to the form, and then inherit from the form in the class library, the visual designer remains disabled.

    I would suggest using a base RadGridView which you can then easily drop onto any form from the toolbox.
    Regards,
    Richard

  8. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 14 Mar 2011 Link to this post

    @Richard you are right,

    Sorry, i don't know why i had the impression that the the problem was that you could not see the control / the control was disabled in the toolbox in a different project.
    This is what happens if you create a custom control in a forms application and you try to use that control in a different application.

    For this case i would suggest using just custom controls.

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga
    Telerik WinForms MVP
Back to Top
UI for WinForms is Visual Studio 2017 Ready