Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. PropertyGrid

PropertyGrid

Scheduled Pinned Locked Moved C#
question
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hallo... Are there any possibilities to use PropertyGrid only as "View" ? That means, the propertyGrid cannot be edited. Thanks...

    P P V 3 Replies Last reply
    0
    • L Lost User

      Hallo... Are there any possibilities to use PropertyGrid only as "View" ? That means, the propertyGrid cannot be edited. Thanks...

      P Offline
      P Offline
      phannon86
      wrote on last edited by
      #2

      How about setting the Enabled property to false?

      He who makes a beast out of himself gets rid of the pain of being a man

      L 1 Reply Last reply
      0
      • P phannon86

        How about setting the Enabled property to false?

        He who makes a beast out of himself gets rid of the pain of being a man

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        If I set enabled=false, I cannot expand the tree anymore.

        P 1 Reply Last reply
        0
        • L Lost User

          If I set enabled=false, I cannot expand the tree anymore.

          P Offline
          P Offline
          phannon86
          wrote on last edited by
          #4

          After a bit of Googling, this article seems to mention something that sounds like what you want. Here.[^] Scroll down to "Using Attributes in PropertyGrid". I have never really used a PropertyGrid before so can't really help you much more than that.

          He who makes a beast out of himself gets rid of the pain of being a man

          1 Reply Last reply
          0
          • L Lost User

            Hallo... Are there any possibilities to use PropertyGrid only as "View" ? That means, the propertyGrid cannot be edited. Thanks...

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            You can mark properties as readonly using the ReadOnlyAttribute.

            Deja View - the feeling that you've seen this post before.

            My blog | My articles

            1 Reply Last reply
            0
            • L Lost User

              Hallo... Are there any possibilities to use PropertyGrid only as "View" ? That means, the propertyGrid cannot be edited. Thanks...

              V Offline
              V Offline
              visualhint
              wrote on last edited by
              #6

              Hello, if a commercial product is an option for you, only Smart PropertyGrid will give you the flexibility of choosing a disabled mode for the PropertyGrid. By descending order of "disabled" importance: 1. It can be completely disabled (nothing is actionable, not even the scrollbar). 2. It can be completely disabled (nothing is actionable except the +/- signs and it is scrollable). 3. It can be disabled with the properties still selectable and scrollable. 4. It can minimally be disabled with the property values selectable so that you can copy their value. The PropertyGrid doesn't handle a direct way to disable everything. You would have to set a hardcoded Readonly attribute on your properties or to publish dynamically a Readonly attribute for your properties with a TypeConverter or Type Descriptor... not very easy for a simple requirement... Best regards, Nicolas Cadilhac @ VisualHint Smart PropertyGrid.Net Microsoft PropertyGrid Resource List Free PropertyGrid for MFC Smart FieldPackEditor.Net / DateTimePicker

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups