Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Question About Properties

Back to Forum: Tech Off
  • User profile image

    i'm building a web control library and i have some properties to be changed debending on another property ...
    as you can say i have prop1 and prop2 and prop3 and prop1 is a bool property so i need to that if the prop1 is true the prop2 will be aappear to the user and if he change it to false the prop3 will be available to the user in the grid view ...

  • User profile image

    You want to hide a property? You should bring more clearity into your question... It is not really cear to me.

    Hiding a complete property at runtime is not possible. The property is part of the class and embedded in the meta data...

    If you are doing a custom control, you could just question the property and output the HTML depending on your prop1 value.

  • User profile image

    As littleguru mentioned, you can't.  You can hide properties in the Property Window in Visual Studio by setting the Visibility (er...I don't remember what attribute it is offhand actually), but the user will always be able to set the property in code.  It is not good design to make properties dependent on each other.  Properties should be able to be set in any order at any time.  What exactly are your properties?  Maybe we could make a suggestion on how to set them up a different way.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.