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
8 Posts 3 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.
  • K Offline
    K Offline
    KBou
    wrote on last edited by
    #1

    Hi, I'm using a PropertyGrid on my custom property class. I want to dynamicly set a property to ReadOnly or hide it. How do I do this? Gr.

    L 1 Reply Last reply
    0
    • K KBou

      Hi, I'm using a PropertyGrid on my custom property class. I want to dynamicly set a property to ReadOnly or hide it. How do I do this? Gr.

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      [ReadOnly]
      public bool Foo {get;set;}

      [Browsable(false)]
      public bool Bar {get;set;}

      xacc.ide - now with TabsToSpaces support
      IronScheme - 1.0 alpha 4a out now (29 May 2008)

      K 1 Reply Last reply
      0
      • L leppie

        [ReadOnly]
        public bool Foo {get;set;}

        [Browsable(false)]
        public bool Bar {get;set;}

        xacc.ide - now with TabsToSpaces support
        IronScheme - 1.0 alpha 4a out now (29 May 2008)

        K Offline
        K Offline
        KBou
        wrote on last edited by
        #3

        I'n not sure what I'm suppose to do here. When I add [ReadOnly] to my property I get an error. I tried something like [ReadOnly(Foo)] but that not allowed either. Could you give me a bit more described answer. Thanks

        modified on Tuesday, July 1, 2008 4:28 AM

        L 1 Reply Last reply
        0
        • K KBou

          I'n not sure what I'm suppose to do here. When I add [ReadOnly] to my property I get an error. I tried something like [ReadOnly(Foo)] but that not allowed either. Could you give me a bit more described answer. Thanks

          modified on Tuesday, July 1, 2008 4:28 AM

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

          using System.ComponentModel; [ReadOnly(true)] or [ReadOnly(false)]

          K 1 Reply Last reply
          0
          • L Lost User

            using System.ComponentModel; [ReadOnly(true)] or [ReadOnly(false)]

            K Offline
            K Offline
            KBou
            wrote on last edited by
            #5

            Well I think i haven't been very clear. I know this. But I want to change this Dynamicly. By that I mean I wan't to change this at runtime by clicking on a button or something.

            L 1 Reply Last reply
            0
            • K KBou

              Well I think i haven't been very clear. I know this. But I want to change this Dynamicly. By that I mean I wan't to change this at runtime by clicking on a button or something.

              L Offline
              L Offline
              leppie
              wrote on last edited by
              #6

              Well you should flippen well ask that! And why vote me down when I gave you the correct answer for your original question? The answer is you cant do that. (You can probably but that will require a lot of work, and I have not gone down that route).

              xacc.ide - now with TabsToSpaces support
              IronScheme - 1.0 alpha 4a out now (29 May 2008)

              K 1 Reply Last reply
              0
              • L leppie

                Well you should flippen well ask that! And why vote me down when I gave you the correct answer for your original question? The answer is you cant do that. (You can probably but that will require a lot of work, and I have not gone down that route).

                xacc.ide - now with TabsToSpaces support
                IronScheme - 1.0 alpha 4a out now (29 May 2008)

                K Offline
                K Offline
                KBou
                wrote on last edited by
                #7

                Well sorry for voting you down but your answer wasn't verry complete and I thought the word Dynamicly made it pretty clear I wasn't looking for a static solution. But we might disagree on that one. Although I found a project in wich it is done (link[^]), this was way to complex for me so I'm using a workaround now. Anyway thanks for your reply. and sorry again for the "down voting".

                L 1 Reply Last reply
                0
                • K KBou

                  Well sorry for voting you down but your answer wasn't verry complete and I thought the word Dynamicly made it pretty clear I wasn't looking for a static solution. But we might disagree on that one. Although I found a project in wich it is done (link[^]), this was way to complex for me so I'm using a workaround now. Anyway thanks for your reply. and sorry again for the "down voting".

                  L Offline
                  L Offline
                  leppie
                  wrote on last edited by
                  #8

                  KBou wrote:

                  Although I found a project in wich it is done (link[^]), this was way to complex for me so I'm using a workaround now.

                  That's what I thought :)

                  KBou wrote:

                  I thought the word Dynamicly made it pretty clear I wasn't looking for a static solution.

                  Dynamic can mean a lot :)

                  KBou wrote:

                  Anyway thanks for your reply. and sorry again for the "down voting".

                  No problem :)

                  xacc.ide - now with TabsToSpaces support
                  IronScheme - 1.0 alpha 4a out now (29 May 2008)

                  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