Property Grid: Attribute to only show non-inherited properties

Discussion in 'ASP .Net' started by Nathan Sokalski, Oct 14, 2009.

  1. I have a custom control that inherits from
    System.Web.UI.WebControls.CompositeControl. In the Property Grid in Design
    View, I only want the properties that I add in my code to be displayed in
    the Property Grid. Is there an attribute that will hide, by default, all
    inherited properties (except of course for some of the ones like ID that you
    always need, but I can use the <ComponentModel.Browsable(True) to fix that>
    attribute to fix that)? Also, I would like to point out that I would have
    preferred to use System.Web.UI.Control, but that did not seem to work since
    my custom control involves an ITemplate (using System.Web.UI.Control would
    at least have less properties to inherit). Any suggestions? Thanks.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
     
    Nathan Sokalski, Oct 14, 2009
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. beginner
    Replies:
    4
    Views:
    839
    Zentrader
    Jul 28, 2007
  2. Nathan Sokalski
    Replies:
    1
    Views:
    530
    Cor Ligthert
    Mar 17, 2009
  3. Rafa³ Ziêba

    Nullable property in property grid

    Rafa³ Ziêba, Jul 3, 2008, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    906
    Rafa³ Ziêba
    Jul 3, 2008
  4. Garry McGlennon

    Persisting properties in property Grid (help!)

    Garry McGlennon, Jun 24, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    229
    Garry McGlennon
    Jun 24, 2004
  5. Nathan Sokalski

    Control is not showing inherited properties in property grid

    Nathan Sokalski, Mar 15, 2009, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    995
    Cor Ligthert
    Mar 17, 2009
  6. Roedy Green
    Replies:
    5
    Views:
    2,968
    Gene Wirchenko
    Dec 13, 2011
  7. Replies:
    3
    Views:
    174
  8. 7stud --
    Replies:
    11
    Views:
    778
    7stud --
    Nov 9, 2007
Loading...